Changeset 1061 for cpp/frams/model


Ignore:
Timestamp:
01/25/21 20:57:26 (4 years ago)
Author:
oriona
Message:

Static array removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/similarity/EMD/emd.c

    r1050 r1061  
    627627  int i, j, found, minI, minJ;
    628628  double deltaMin, oldVal, diff;
    629   double Delta[MAX_SIG_SIZE1][MAX_SIG_SIZE1];
     629  double** Delta = new double*[_n1];
     630  for(int k = 0; k < _n1; ++k)
     631    Delta[k] = new double[_n2];
    630632  node1_t Ur[MAX_SIG_SIZE1], Vr[MAX_SIG_SIZE1];
    631633  node1_t uHead, *CurU, *PrevU;
     
    776778        }
    777779    } while (uHead.Next != NULL || vHead.Next != NULL);
     780    for(int k = 0; k < _n1; ++k)
     781      delete [] Delta[k];
     782    delete [] Delta;
    778783}
    779784
Note: See TracChangeset for help on using the changeset viewer.