org.genepattern.data.matrix
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constructor Summary | |
ClassVector(java.lang.String[] x)
Constructs a new class vector from the array of class assignments |
|
ClassVector(java.lang.String[] x,
java.lang.String[] classes)
Constructs a new class vector from the array of class assignments |
|
| Method Summary | |
ClassVector[] |
getAllPairs()
Creates a array containing all pairwise class vectors. |
int |
getAssignment(int index)
Gets the class assignment |
int[] |
getAssignments()
Allocates a new array containing the class assignments |
int |
getClassCount()
Gets the number of different possible values taken by the class assignments. |
java.lang.String |
getClassName(int classNumber)
Gets the class name for the specified class number |
int[] |
getIndices(int classNumber)
Gets the indices in the assignments array that have the specified class number. |
ClassVector[] |
getOneVersusAll()
Creates a array containing all one versus all class vectors. |
int |
size()
Gets the number of assignments in this class vector |
ClassVector |
slice(int[] order)
Constructs and returns a new class vector that contains the indicated cells. |
ClassVector |
slice(int[] order,
boolean includeSlicedClassOnly)
Constructs and returns a new class vector that contains the indicated cells. |
java.lang.String |
toAssignmentString()
|
java.lang.String |
toString()
|
ClassVector |
union(ClassVector classVector)
Constructs a new class vector that is the union of this class vector with the given class vector |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ClassVector(java.lang.String[] x)
x - the class assignments
public ClassVector(java.lang.String[] x,
java.lang.String[] classes)
x - the class assignmentsclasses - ordered array of class names. The 0th entry will be given the
assignment 0, the 1st entry the assignment 1, etc.| Method Detail |
public ClassVector union(ClassVector classVector)
classVector - the class vector
public int size()
public ClassVector slice(int[] order, boolean includeSlicedClassOnly)
includeSlicedClassOnly - If false the returned class vector will have a
class count equal to the class count in the this class vector,
even if the returned class vector has less classes than this
class vector and the returned class vector will have the same
numerical class encoding as this class vector.order - the indices
public ClassVector slice(int[] order)
order - the indices
public java.lang.String toAssignmentString()
public java.lang.String toString()
public int getClassCount()
public java.lang.String getClassName(int classNumber)
classNumber - The class number
public int getAssignment(int index)
index - The index
public int[] getAssignments()
public ClassVector[] getOneVersusAll()
public ClassVector[] getAllPairs()
public int[] getIndices(int classNumber)
classNumber - The class number
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||