Interface ICovarianceMatrix

All Superinterfaces:
DataModel, KnowledgeTransferable, Serializable, TetradSerializable, VariableSource
All Known Implementing Classes:
CorrelationMatrix, CorrelationMatrixOnTheFly, CovarianceMatrix, CovarianceMatrixOnTheFly

public interface ICovarianceMatrix extends DataModel
Interface for covariance matrices. Implemented in different ways. See implementations.
Version:
$Id: $Id
Author:
josephramsey
  • Method Details

    • getVariables

      List<Node> getVariables()

      getVariables.

      Specified by:
      getVariables in interface VariableSource
      Returns:
      a List object
    • setVariables

      void setVariables(List<Node> variables)

      setVariables.

      Parameters:
      variables - a List object
    • getVariableNames

      List<String> getVariableNames()

      getVariableNames.

      Specified by:
      getVariableNames in interface VariableSource
      Returns:
      a List object
    • getVariableName

      String getVariableName(int index)

      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.

      Specified by:
      getName in interface DataModel
      Returns:
      a String object
    • setName

      void setName(String name)
      Sets the name of the data model (may be null).
      Specified by:
      setName in interface DataModel
      Parameters:
      name - the name to set
    • getKnowledge

      Knowledge getKnowledge()

      getKnowledge.

      Specified by:
      getKnowledge in interface KnowledgeTransferable
      Returns:
      a Knowledge object
    • setKnowledge

      void setKnowledge(Knowledge knowledge)
      Sets knowledge to a copy of the given object.
      Specified by:
      setKnowledge in interface KnowledgeTransferable
      Parameters:
      knowledge - the knowledge to set
    • getSubmatrix

      ICovarianceMatrix getSubmatrix(int[] indices)

      getSubmatrix.

      Parameters:
      indices - an array of int objects
      Returns:
      a ICovarianceMatrix object
    • getSubmatrix

      ICovarianceMatrix getSubmatrix(List<String> submatrixVarNames)

      getSubmatrix.

      Parameters:
      submatrixVarNames - a List object
      Returns:
      a ICovarianceMatrix object
    • getSubmatrix

      ICovarianceMatrix getSubmatrix(String[] submatrixVarNames)

      getSubmatrix.

      Parameters:
      submatrixVarNames - an array of String objects
      Returns:
      a ICovarianceMatrix object
    • getValue

      double getValue(int i, int j)

      getValue.

      Parameters:
      i - a int
      j - a int
      Returns:
      a double
    • getSize

      int getSize()

      getSize.

      Returns:
      a int
    • getMatrix

      Matrix getMatrix()

      getMatrix.

      Returns:
      a Matrix object
    • setMatrix

      void setMatrix(Matrix matrix)

      setMatrix.

      Parameters:
      matrix - a Matrix object
    • select

      void select(Node variable)

      select.

      Parameters:
      variable - a Node object
    • clearSelection

      void clearSelection()

      clearSelection.

    • isSelected

      boolean isSelected(Node variable)

      isSelected.

      Parameters:
      variable - a Node object
      Returns:
      a boolean
    • getSelectedVariableNames

      List<String> getSelectedVariableNames()

      getSelectedVariableNames.

      Returns:
      a List object
    • toString

      String toString()

      toString.

      Specified by:
      toString in interface DataModel
      Overrides:
      toString in class Object
      Returns:
      a String object
    • getVariable

      Node getVariable(String name)

      getVariable.

      Specified by:
      getVariable in interface DataModel
      Parameters:
      name - a String 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 int
      j - a int
      v - a double
    • removeVariables

      void removeVariables(List<String> remaining)

      removeVariables.

      Parameters:
      remaining - a List object
    • getSelection

      Matrix getSelection(int[] rows, int[] cols)

      getSelection.

      Parameters:
      rows - an array of int objects
      cols - an array of int objects
      Returns:
      a Matrix object