Package cern.colt.function

Examples of cern.colt.function.IntComparator


      t2 = y[a]; y[a] = y[b]; y[b] = t2;
      t3 = z[a]; z[a] = z[b];  z[b] = t3;
    }
  };

  IntComparator comp = new IntComparator() {
    public int compare(int a, int b) {
      return x[a]==x[b] ? 0 : (x[a]<x[b] ? -1 : 1);
    }
  };
View Full Code Here


      t2 = y[a]; y[a] = y[b]; y[b] = t2;
      t3 = z[a]; z[a] = z[b];  z[b] = t3;
    }
  };
 
  IntComparator comp = new IntComparator() {
    public int compare(int a, int b) {
      if (y[a]==y[b]) return z[a]==z[b] ? 0 : (z[a]<z[b] ? -1 : 1);
      return y[a]<y[b] ? -1 : 1;
    }
  };
View Full Code Here

    double Ax[] = new double[Ai.length];
    int pos=0;
    for(int tmp=0;tmp<stateNumber*(stateNumber+1)/2;++tmp)
    {
      System.arraycopy(buf, 0, tmpBuf, 0, buf.length);   
      cern.colt.Sorting.quickSort(tmpBuf, 0, buf.length, new IntComparator() {

        public int compare(int o1, int o2) {
          ++cnt;
          return o1-o2;
        }});
View Full Code Here

    double Ax[] = new double[Ai.length];
    int pos=0;
    for(int tmp=0;tmp<stateNumber*(stateNumber+1)/2;++tmp)
    {
      System.arraycopy(buf, 0, tmpBuf, 0, buf.length);   
      cern.colt.Sorting.quickSort(tmpBuf, 0, buf.length, new IntComparator() {

        @Override
        public int compare(int o1, int o2) {
          ++cnt;
          return o1-o2;
View Full Code Here

    double Ax[] = new double[Ai.length];
    int pos=0;
    for(int tmp=0;tmp<stateNumber*(stateNumber+1)/2;++tmp)
    {
      System.arraycopy(buf, 0, tmpBuf, 0, buf.length);   
      cern.colt.Sorting.quickSort(tmpBuf, 0, buf.length, new IntComparator() {

        @Override
        public int compare(int o1, int o2) {
          ++cnt;
          return o1-o2;
View Full Code Here

             
              // At this point, we populated Ai and b with elements for the current row (number currentStatePair),
              // so it is time to sort these entries. There is no need to populate Ax right now:
              // all we care about is the state pairs from which there have been transitions leading to the
              // current state (and a diagonal element).
              cern.colt.Sorting.quickSort(tmpAi.elements(),0, colEntriesNumber,new IntComparator() {
                public int compare(int o1, int o2) { return o1-o2; }});
              if (debugThread == threadNo)  { for(int i=0;i< colEntriesNumber;++i) System.out.print(tmpAi.getQuick(i)+" ");System.out.println(); }
              // Now we have to copy the result to the target array.
              int pos = currentPosition[threadNo]-1;// the position where to start writing into Ai and Ax, minus 1 since it will be incremented when we find the our new value is above prev (below).
              Ap[currentStatePair]=pos+1;// Ap maps each state pair to the corresponding position in Ai and Ax. We record here the first index (in Ai) of the current column
View Full Code Here

    double Ax[] = new double[Ai.length];
    int pos=0;
    for(int tmp=0;tmp<stateNumber*(stateNumber+1)/2;++tmp)
    {
      System.arraycopy(buf, 0, tmpBuf, 0, buf.length);   
      cern.colt.Sorting.quickSort(tmpBuf, 0, buf.length, new IntComparator() {

        @Override
        public int compare(int o1, int o2) {
          ++cnt;
          return o1-o2;
View Full Code Here

    double Ax[] = new double[Ai.length];
    int pos=0;
    for(int tmp=0;tmp<stateNumber*(stateNumber+1)/2;++tmp)
    {
      System.arraycopy(buf, 0, tmpBuf, 0, buf.length);   
      cern.colt.Sorting.quickSort(tmpBuf, 0, buf.length, new IntComparator() {

        @Override
        public int compare(int o1, int o2) {
          ++cnt;
          return o1-o2;
View Full Code Here

    double Ax[] = new double[Ai.length];
    int pos=0;
    for(int tmp=0;tmp<stateNumber*(stateNumber+1)/2;++tmp)
    {
      System.arraycopy(buf, 0, tmpBuf, 0, buf.length);   
      cern.colt.Sorting.quickSort(tmpBuf, 0, buf.length, new IntComparator() {

        public int compare(int o1, int o2) {
          ++cnt;
          return o1-o2;
        }});
View Full Code Here

TOP

Related Classes of cern.colt.function.IntComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.