pyfmtools 5.3.6__tar.gz → 5.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyfmtools-5.3.6/src/pyfmtools.egg-info → pyfmtools-5.3.8}/PKG-INFO +1 -1
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/setup.py +1 -1
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fmrandom.h +2 -2
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fmrandomsort.inc +36 -13
- {pyfmtools-5.3.6 → pyfmtools-5.3.8/src/pyfmtools.egg-info}/PKG-INFO +1 -1
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/LICENSE.txt +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/MANIFEST.in +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/README.md +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/setup.cfg +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/binarylattice.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/buildPyfmtools.py +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/colamd.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/colamd.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/commonlib.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/commonlib.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/declare.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fmrandom.cpp +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fortify.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fuzzymeasurefit.cpp +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fuzzymeasurefit.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fuzzymeasurefit3.cpp +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fuzzymeasuretools.cpp +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/fuzzymeasuretools.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/gbrealloc.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/generaldefs.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/hbio.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/ini.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/ini.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/isfixedvar.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_BFP.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_BFP1.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_BFP2.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_Hash.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_Hash.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_LUSOL.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_LUSOL.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_MDO.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_MDO.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_MPS.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_MPS.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_SOS.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_SOS.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_crash.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_crash.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_etaPFI.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_explicit.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_fortify.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_lib.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_lib.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_matrix.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_matrix.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_mipbb.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_mipbb.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_params.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_presolve.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_presolve.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_price.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_price.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_pricePSE.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_pricePSE.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_report.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_report.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_rlp.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_scale.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_scale.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_simplex.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_simplex.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_types.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_utils.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_utils.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_wlp.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lp_wlp.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lpkit.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lpslink56.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lpsolve.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol1.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol2.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol6a.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol6l0.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol6u.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol7a.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusol8a.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusolio.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/lusolio.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/minimalsplus.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/mmio.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/mmio.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/myblas.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/myblas.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/pyfmtools.egg-info/SOURCES.txt +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/pyfmtools.egg-info/dependency_links.txt +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/pyfmtools.egg-info/requires.txt +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/pyfmtools.egg-info/top_level.txt +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/pyfmtools.py +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/sparselib.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/sparselib.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/stdafx.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/ufortify.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/wrapperpy.cpp +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/wrapperpy.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/yacc_read.c +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/src/yacc_read.h +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/tests/test_no_wrapper.py +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/tests/test_wrapper.py +0 -0
- {pyfmtools-5.3.6 → pyfmtools-5.3.8}/tests/test_wrapper0.py +0 -0
|
@@ -10,7 +10,7 @@ with open("README.md", "r") as fh:
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name="pyfmtools",
|
|
13
|
-
version="5.3.
|
|
13
|
+
version="5.3.8",
|
|
14
14
|
description="Library for handling and fitting fuzzy measures",
|
|
15
15
|
long_description=open('README.md').read(),
|
|
16
16
|
long_description_content_type="text/markdown",
|
|
@@ -182,5 +182,5 @@ LIBDLL_API int CheckMonMob2additive2(double* Mob, int n, int length, double* te
|
|
|
182
182
|
LIBDLL_API void ConvertCoMob2Kinter(double* mu, double* Mob, int n, int_64 m, int kadd, int len, int fullmu);
|
|
183
183
|
LIBDLL_API double ChoquetCoMobKInter(double* x, double* Mob, int n, int_64 m, int kadd, int length);
|
|
184
184
|
|
|
185
|
-
LIBDLL_API int generate_fm_minimals(int_64 num, int n,
|
|
186
|
-
LIBDLL_API int generate_fm_minimals_le(int_64 num, int n,
|
|
185
|
+
LIBDLL_API int generate_fm_minimals(int_64 num, int n, double ratio, int markov, double* weights, double* vv);
|
|
186
|
+
LIBDLL_API int generate_fm_minimals_le(int_64 num, int n, double ratio, int markov, double* weights, int_64* vv);
|
|
@@ -42,6 +42,9 @@ void GenerateOnSimplex1(vector<double>& w, int_64 dim)
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
double* valuesptr;
|
|
45
|
+
|
|
46
|
+
LIBDLL_API int generate_fm_balanced(int_64 num, int n, double* vv);
|
|
47
|
+
|
|
45
48
|
int fm_sortvals(size_t i1, size_t i2)
|
|
46
49
|
{
|
|
47
50
|
return (valuesptr[i1] < valuesptr[i2]);
|
|
@@ -80,21 +83,41 @@ LIBDLL_API int generate_fm_sorting01(int_64 num, int n, int markov, int option,
|
|
|
80
83
|
for (int_64 A = 0; A < m; ++A) bitswapped[A] = swapbits(A, perm, n);
|
|
81
84
|
|
|
82
85
|
// Step 1.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
int
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
if (option == 0) {
|
|
87
|
+
int V = RanVertex(rng); // we use V vertices here
|
|
88
|
+
for (int i = 0; i < V * MaxAntichain; i++) Vertices[i] = RanUG(rng);
|
|
89
|
+
for (int i = 0; i < V; i++) VertexLen[i] = RanLen(rng);
|
|
90
|
+
// vertices of random compositions
|
|
91
|
+
iota(subsets.begin(), subsets.end(), 0); // assign values 0,1,2,3,\ldots
|
|
92
|
+
GenerateOnSimplex1(weights, V); // V weights that sum to one
|
|
93
|
+
for (int_64 A = 1; A < m - 1; A++) { // for each subset of N
|
|
94
|
+
values[A] = 0;
|
|
95
|
+
for (int v = 0; v < V; v++) {
|
|
96
|
+
int flag = 0;
|
|
97
|
+
for (int ug = 0; ug < VertexLen[v]; ug++)
|
|
98
|
+
if (IsSubset(A, Vertices[ug + v * V])) flag = 1; // mu(A)=1
|
|
99
|
+
if (flag) values[A] += weights[v]; // convex combination of vertices
|
|
100
|
+
}
|
|
96
101
|
}
|
|
97
102
|
}
|
|
103
|
+
else //option==1
|
|
104
|
+
{
|
|
105
|
+
//just take random combination of balanced with very unbalanced
|
|
106
|
+
iota(subsets.begin(), subsets.end(), 0);
|
|
107
|
+
double p = distribution(rng);
|
|
108
|
+
|
|
109
|
+
vector<double> bal(m);
|
|
110
|
+
generate_fm_balanced(1, n, bal.data());
|
|
111
|
+
for (int_64 i = 1; i < m - 1; i++) values[i] = distribution(rng);
|
|
112
|
+
values[0] = -0.1; values[m - 1] = 1.1;
|
|
113
|
+
|
|
114
|
+
sort(values.begin(), values.end(), less<double>());
|
|
115
|
+
values[0] = 0; values[m - 1] = 1;
|
|
116
|
+
// this is unbalanced
|
|
117
|
+
|
|
118
|
+
for (int_64 i = 1; i < m - 1; i++) values[i] = values[i] * p + (1 - p) * bal[bit2card[i]];
|
|
119
|
+
|
|
120
|
+
}
|
|
98
121
|
values[0] = 0; values[m - 1] = 1; // empty set and N
|
|
99
122
|
|
|
100
123
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|