|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsources.Variable
sources.CategorialVariable
A class that represents a categorial variable
Field Summary |
Fields inherited from class sources.Variable |
id, name |
Constructor Summary | |
CategorialVariable(int[] ordvalues,
int length,
java.lang.String nam,
int identnr)
create a new categorial variable from an integer array |
|
CategorialVariable(java.lang.String[] names,
int length,
java.lang.String nam,
int identnr)
Creates new CategorialVariable |
|
CategorialVariable(java.lang.String[] names,
int length,
java.lang.String nam,
int identnr,
int ident)
Creates new CategorialVariable same as above (without calculations) |
Method Summary | |
int[] |
getCasesFromCat(int cat,
int[] cases)
returns an array of cases, given a specific category number and an array of initial cases Used for mosaic plots! |
int |
getCatNumberFromName(java.lang.String str)
returns the category number of a category name |
int |
getCatsAnz()
Returns the number of categories |
int |
getCatsValueFrom(int c)
returns the category number of one case |
int |
getCount()
returns the number of cases |
double[] |
getCountsforCats()
returns an array of the counts for every category of this variable |
double[] |
getCountsforCats(ContinuousVariable var)
returns an array of weights for every category of this variable |
double[] |
getCountsforCats(ContinuousVariable var,
Selectioner sel)
returns an array of selected weights for all categories of this variable |
double[] |
getCountsforCats(Selectioner sel)
returns an array of selected counts for all categories of this variable |
java.lang.String |
getNamefromCat(int i)
return the name from the category of i |
boolean[] |
getPositionsfrom(int d)
Return all cases with selected category |
boolean[] |
getPositionsfrom(java.lang.String c)
Return all cases with selected category |
java.lang.String |
getTextualRepresentation(int i)
Returns the textual Representation of this case |
java.lang.String[] |
getValues()
Return values of the variable |
void |
prepare()
prepares this variable |
Methods inherited from class sources.Variable |
equals, getID, getName, getTextualRepresentations |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CategorialVariable(java.lang.String[] names, int length, java.lang.String nam, int identnr)
identnr
- the identity number of this variablenames
- category per caselength
- # casesnam
- Name of the Variablepublic CategorialVariable(java.lang.String[] names, int length, java.lang.String nam, int identnr, int ident)
names
- length
- nam
- identnr
- ident
- public CategorialVariable(int[] ordvalues, int length, java.lang.String nam, int identnr)
ordvalues
- the integer arraylength
- the length of the arraynam
- the name of this variableidentnr
- the identity number of the variableMethod Detail |
public void prepare()
public int getCount()
getCount
in class Variable
public int getCatsAnz()
public java.lang.String getNamefromCat(int i)
i
- the category
public int getCatsValueFrom(int c)
c
- the position of the desired case
public java.lang.String getTextualRepresentation(int i)
getTextualRepresentation
in class Variable
i
- case to get the textual representation
public java.lang.String[] getValues()
public boolean[] getPositionsfrom(java.lang.String c)
c
- Category as String
public int getCatNumberFromName(java.lang.String str)
str
- the name of the category
public boolean[] getPositionsfrom(int d)
d
- Category in int
public double[] getCountsforCats()
public double[] getCountsforCats(ContinuousVariable var)
var
- the weight variable
public double[] getCountsforCats(Selectioner sel)
sel
- the selectioner, including the selected values
public double[] getCountsforCats(ContinuousVariable var, Selectioner sel)
var
- the weight variablesel
- the selectioner
public int[] getCasesFromCat(int cat, int[] cases)
cat
- the category numbercases
- the initial cases
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |