Class Mapping

java.lang.Object
edu.cmu.tetrad.sem.Mapping
All Implemented Interfaces:
TetradSerializable, Serializable

public class Mapping extends Object implements TetradSerializable

Maps a parameter to the matrix element where its value is stored in the model.

Author:
Frank Wimberly, Joe Ramsey
See Also:
  • Constructor Details

    • Mapping

      public Mapping(ISemIm semIm, Parameter parameter, Matrix matrix, int i, int j)
      Constructs matrix new mapping using the given freeParameters.
      Parameters:
      parameter - The parameter that this maps.
      matrix - The array containing matrix[i][j], the element to be manipulated.
      i - Left coordinates of matrix[i][j].
      j - Right coordinate of matrix[i][j].
  • Method Details

    • serializableInstance

      public static Mapping serializableInstance()
      Generates a simple exemplar of this class to test serialization.
    • getValue

      public double getValue()
      Returns:
      the value of the array element at (i, j).
    • setValue

      public void setValue(double x)
      Sets the value of the array element at the stored coordinates (i, j). If the array is symmetric sets two elements.
    • getParameter

      public Parameter getParameter()
      Returns:
      the paramter that this mapping maps.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      a String containing information (array name and values of subscripts) about the array element associated with this mapping.