Package edu.cmu.tetrad.data
Interface ICovarianceMatrix
- All Superinterfaces:
DataModel,KnowledgeTransferable,Serializable,TetradSerializable,VariableSource
- All Known Implementing Classes:
CorrelationMatrix,CorrelationMatrixOnTheFly,CovarianceMatrix,CovarianceMatrixOnTheFly
Interface for covariance matrices. Implemented in different ways. See implementations.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Field Summary
Fields inherited from interface edu.cmu.tetrad.data.DataModel
serialVersionUID -
Method Summary
Modifier and TypeMethodDescriptionvoidclearSelection.intgetDimension.getKnowledge.getMatrix.getName()getName.intgetSampleSize.getSelectedVariableNames.getSelection(int[] rows, int[] cols) getSelection.intgetSize()getSize.getSubmatrix(int[] indices) getSubmatrix.getSubmatrix(String[] submatrixVarNames) getSubmatrix.getSubmatrix(List<String> submatrixVarNames) getSubmatrix.doublegetValue(int i, int j) getValue.getVariable(String name) getVariable.getVariableName(int index) getVariableName.getVariableNames.getVariables.booleanisSelected(Node variable) isSelected.voidremoveVariables(List<String> remaining) removeVariables.voidselect.voidsetKnowledge(Knowledge knowledge) Sets knowledge to a copy of the given object.voidsetMatrix.voidSets the name of the data model (may be null).voidsetSampleSize(int sampleSize) setSampleSize.voidsetValue(int i, int j, double v) setValue.voidsetVariables(List<Node> variables) setVariables.toString()toString.Methods inherited from interface edu.cmu.tetrad.data.DataModel
copy, isContinuous, isDiscrete, isMixed
-
Method Details
-
getVariables
getVariables.
- Specified by:
getVariablesin interfaceVariableSource- Returns:
- a
Listobject
-
setVariables
setVariables.
- Parameters:
variables- aListobject
-
getVariableNames
getVariableNames.
- Specified by:
getVariableNamesin interfaceVariableSource- Returns:
- a
Listobject
-
getVariableName
getVariableName.
- Parameters:
index- a int- Returns:
- a
Stringobject
-
getDimension
int getDimension()getDimension.
- Returns:
- a int
-
getSampleSize
int getSampleSize()getSampleSize.
- Returns:
- a int
-
setSampleSize
void setSampleSize(int sampleSize) setSampleSize.
- Parameters:
sampleSize- a int
-
getName
String getName()getName.
-
setName
Sets the name of the data model (may be null). -
getKnowledge
Knowledge getKnowledge()getKnowledge.
- Specified by:
getKnowledgein interfaceKnowledgeTransferable- Returns:
- a
Knowledgeobject
-
setKnowledge
Sets knowledge to a copy of the given object.- Specified by:
setKnowledgein interfaceKnowledgeTransferable- Parameters:
knowledge- the knowledge to set
-
getSubmatrix
getSubmatrix.
- Parameters:
indices- an array ofintobjects- Returns:
- a
ICovarianceMatrixobject
-
getSubmatrix
getSubmatrix.
- Parameters:
submatrixVarNames- aListobject- Returns:
- a
ICovarianceMatrixobject
-
getSubmatrix
getSubmatrix.
- Parameters:
submatrixVarNames- an array ofStringobjects- Returns:
- a
ICovarianceMatrixobject
-
getValue
double getValue(int i, int j) getValue.
- Parameters:
i- a intj- a int- Returns:
- a double
-
getSize
int getSize()getSize.
- Returns:
- a int
-
getMatrix
Matrix getMatrix()getMatrix.
- Returns:
- a
Matrixobject
-
setMatrix
setMatrix.
- Parameters:
matrix- aMatrixobject
-
select
select.
- Parameters:
variable- aNodeobject
-
clearSelection
void clearSelection()clearSelection.
-
isSelected
isSelected.
- Parameters:
variable- aNodeobject- Returns:
- a boolean
-
getSelectedVariableNames
getSelectedVariableNames.
- Returns:
- a
Listobject
-
toString
String toString()toString.
-
getVariable
getVariable.
- Specified by:
getVariablein interfaceDataModel- Parameters:
name- aStringobject- Returns:
- the variable with the given name, or null if no such variable exists.
-
setValue
void setValue(int i, int j, double v) setValue.
- Parameters:
i- a intj- a intv- a double
-
removeVariables
removeVariables.
- Parameters:
remaining- aListobject
-
getSelection
getSelection.
- Parameters:
rows- an array ofintobjectscols- an array ofintobjects- Returns:
- a
Matrixobject
-