TC Java
2011 Version

gov.nih.nlm.nls.tc.Lib
Class Count2fOperator

java.lang.Object
  extended by gov.nih.nlm.nls.tc.Lib.Count2fOperator

public class Count2fOperator
extends java.lang.Object

This class provides Count2f Scores Vector operations

History:

Version:
V-2011
Author:
NLM Lexical Systems Group

Constructor Summary
Count2fOperator()
          Create the Count2f operator object.
 
Method Summary
static java.util.Vector<Count2f> Add(java.util.Vector<Count2f> vec1, java.util.Vector<Count2f> vec2, JournalDescriptors jds)
          Operation add for two JD Vectors in Count2f.
static java.util.Vector<Count2f> Add(java.util.Vector<Count2f> vec1, java.util.Vector<Count2f> vec2, SemanticTypes sts)
          Operation add for two ST Vectors in Count2f.
static Count2f GetCosCoefficientObj(java.util.Vector<Count2f> vec1, java.util.Vector<Count2f> vec2)
          Get the cosine coefficients for two Vector in Count2f.
static java.util.Vector<Count2f> Standardize(java.util.Vector<Count2f> inVec, JournalDescriptors jds)
          Standardize the Count2f Vector by rearrnging the vector in index order and fill 0 in empty elements.
static java.util.Vector<Count2f> Standardize(java.util.Vector<Count2f> inVec, SemanticTypes sts)
          Standardize the order of ST scores.
static java.util.Vector<Count1f> ToCount1(java.util.Vector<Count2f> inVec, int countNo)
          Convert a Vector in Count2f to a Vector in Count1f by retrieving specified scores field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Count2fOperator

public Count2fOperator()
Create the Count2f operator object.

Method Detail

ToCount1

public static java.util.Vector<Count1f> ToCount1(java.util.Vector<Count2f> inVec,
                                                 int countNo)
Convert a Vector in Count2f to a Vector in Count1f by retrieving specified scores field.

Parameters:
inVec - Vector in Count2f to be converted
countNo - field to be retrieved, BY_COUNT1|BY_COUNT2
Returns:
Converted Vector in Count1f

Add

public static java.util.Vector<Count2f> Add(java.util.Vector<Count2f> vec1,
                                            java.util.Vector<Count2f> vec2,
                                            SemanticTypes sts)
Operation add for two ST Vectors in Count2f.

Parameters:
vec1 - the first vector to be added
vec2 - the second vector to be added
sts - Semantic Types Object
Returns:
the summation of Vectors vec1 and vec2

Add

public static java.util.Vector<Count2f> Add(java.util.Vector<Count2f> vec1,
                                            java.util.Vector<Count2f> vec2,
                                            JournalDescriptors jds)
Operation add for two JD Vectors in Count2f.

Parameters:
vec1 - the first vector to be added
vec2 - the second vector to be added
jds - Journal Descriptos Object
Returns:
the summation of Vectors vec1 and vec2

GetCosCoefficientObj

public static Count2f GetCosCoefficientObj(java.util.Vector<Count2f> vec1,
                                           java.util.Vector<Count2f> vec2)
Get the cosine coefficients for two Vector in Count2f.

Parameters:
vec1 - input Vector 1 for cosine coefficients
vec2 - input Vector 2 for cosine coefficients
Returns:
cosine coefficients vector in Count2f

Standardize

public static java.util.Vector<Count2f> Standardize(java.util.Vector<Count2f> inVec,
                                                    SemanticTypes sts)
Standardize the order of ST scores. This method rearrnges the vector in index order and fill 0 in empty elements. Element will no tbe added to outVec if it's tui is not in sts.

Parameters:
inVec - Vector of ST scores to be standardized
sts - Semantic Types Object
Returns:
standardized Vector for ST scores in Count2f

Standardize

public static java.util.Vector<Count2f> Standardize(java.util.Vector<Count2f> inVec,
                                                    JournalDescriptors jds)
Standardize the Count2f Vector by rearrnging the vector in index order and fill 0 in empty elements. Element will not be added to outVec if jdid is not in jds.

Parameters:
inVec - Vector in Count2f to be standardized
jds - Journal Descriptor Object
Returns:
standardized Vector in Count2f

TC Java
2011 Version

Submit a bug or feature

Copyright © 2011 National Library of Medicine