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 TypeMethodDescriptionvoid
clearSelection.int
getDimension.getKnowledge.getMatrix.getName()
getName.int
getSampleSize.getSelectedVariableNames.getSelection
(int[] rows, int[] cols) getSelection.int
getSize()
getSize.getSubmatrix
(int[] indices) getSubmatrix.getSubmatrix
(String[] submatrixVarNames) getSubmatrix.getSubmatrix
(List<String> submatrixVarNames) getSubmatrix.double
getValue
(int i, int j) getValue.getVariable
(String name) getVariable.getVariableName
(int index) getVariableName.getVariableNames.getVariables.boolean
isSelected
(Node variable) isSelected.void
removeVariables
(List<String> remaining) removeVariables.void
select.void
setKnowledge
(Knowledge knowledge) Sets knowledge to a copy of the given object.void
setMatrix.void
Sets the name of the data model (may be null).void
setSampleSize
(int sampleSize) setSampleSize.void
setValue
(int i, int j, double v) setValue.void
setVariables
(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:
getVariables
in interfaceVariableSource
- Returns:
- a
List
object
-
setVariables
setVariables.
- Parameters:
variables
- aList
object
-
getVariableNames
getVariableNames.
- Specified by:
getVariableNames
in interfaceVariableSource
- Returns:
- a
List
object
-
getVariableName
getVariableName.
- Parameters:
index
- a int- Returns:
- a
String
object
-
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:
getKnowledge
in interfaceKnowledgeTransferable
- Returns:
- a
Knowledge
object
-
setKnowledge
Sets knowledge to a copy of the given object.- Specified by:
setKnowledge
in interfaceKnowledgeTransferable
- Parameters:
knowledge
- the knowledge to set
-
getSubmatrix
getSubmatrix.
- Parameters:
indices
- an array ofint
objects- Returns:
- a
ICovarianceMatrix
object
-
getSubmatrix
getSubmatrix.
- Parameters:
submatrixVarNames
- aList
object- Returns:
- a
ICovarianceMatrix
object
-
getSubmatrix
getSubmatrix.
- Parameters:
submatrixVarNames
- an array ofString
objects- Returns:
- a
ICovarianceMatrix
object
-
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
Matrix
object
-
setMatrix
setMatrix.
- Parameters:
matrix
- aMatrix
object
-
select
select.
- Parameters:
variable
- aNode
object
-
clearSelection
void clearSelection()clearSelection.
-
isSelected
isSelected.
- Parameters:
variable
- aNode
object- Returns:
- a boolean
-
getSelectedVariableNames
getSelectedVariableNames.
- Returns:
- a
List
object
-
toString
String toString()toString.
-
getVariable
getVariable.
- Specified by:
getVariable
in interfaceDataModel
- Parameters:
name
- aString
object- 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
- aList
object
-
getSelection
getSelection.
- Parameters:
rows
- an array ofint
objectscols
- an array ofint
objects- Returns:
- a
Matrix
object
-