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.

Version:
$Id: $Id
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].
      semIm - a ISemIm object
  • Method Details

    • serializableInstance

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

      public double getValue()

      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.
      Parameters:
      x - a double
    • getParameter

      public Parameter getParameter()

      Getter for the field parameter.

      Returns:
      the paramter that this mapping maps.
    • toString

      public String toString()

      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.