Package edu.wiki.concept

Examples of edu.wiki.concept.TroveConceptVector


          return null;
        }
       
        HeapSort.heapSort( values, ids );
       
        IConceptVector newCv = new TroveConceptVector(ids.length);
    for( int i=ids.length-1; i>=0 && values[i] > 0; i-- ) {
      newCv.set( ids[i], values[i] / numTerms );
    }
   
    return newCv;
  }
View Full Code Here


   * Returns trimmed form of concept vector
   * @param cv
   * @return
   */
  public IConceptVector getNormalVector(IConceptVector cv, int LIMIT){
    IConceptVector cv_normal = new TroveConceptVector( LIMIT);
    IConceptIterator it;
   
    if(cv == null)
      return null;
   
    it = cv.orderedIterator();
   
    int count = 0;
    while(it.next()){
      if(count >= LIMIT) break;
      cv_normal.set(it.getId(), it.getValue());
      count++;
    }
   
    return cv_normal;
  }
View Full Code Here

      });
    Collections.reverse(keys);
   
   

    IConceptVector cv_link = new TroveConceptVector(maxConceptId);
   
    int c = 0;
    for(int p : keys){
      cv_link.set(p, secondMap.get(p));
      c++;
      if(c >= LIMIT){
        break;
      }
    }
View Full Code Here

TOP

Related Classes of edu.wiki.concept.TroveConceptVector

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.