Changeset 1130 for cpp/frams/model/similarity/EMD/emd.c
 Timestamp:
 04/16/21 15:55:34 (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/model/similarity/EMD/emd.c
r1064 r1130 19 19 #include <stdlib.h> 20 20 #include <math.h> 21 #include <algorithm> 21 22 22 23 #include "emd.h" … … 100 101 { 101 102 int itr; 102 int max_n = max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have.103 int max_n = std::max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have. 103 104 double totalCost; 104 105 float w; … … 211 212 { 212 213 int i, j; 213 int max_n = max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have.214 int max_n = std::max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have. 214 215 double sSum, dSum, diff; 215 216 feature_t *P1, *P2; … … 474 475 { 475 476 int i, j, k; 476 int max_n = max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have.477 int max_n = std::max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have. 477 478 double xMin; 478 479 int steps; … … 555 556 { 556 557 int i, steps; 557 int max_n = max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have.558 int max_n = std::max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have. 558 559 node2_t **CurX, *NewX; 559 560 char *IsUsed=new char[2*max_n]; … … 652 653 { 653 654 int i, j, found, minI, minJ; 654 int max_n = max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have.655 int max_n = std::max(_n1, _n2); //max_n was introduced in r1062 instead of the #defined constant MAX_SIG_SIZE1=1000 in the original implementation. max_n is better than the constant, but it would be even better to use either _n1 or _n2, if we only knew what size each individual array should precisely have. 655 656 double deltaMin, oldVal, diff; 656 657 double** Delta = new double*[_n1];
Note: See TracChangeset
for help on using the changeset viewer.