DoublyStochasticMatrix.java

// FILE public. . . . . d:/hak/hlt/src/hlt/math/matrix/sources/DoublyStochasticMatrix.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Fri Nov 15 18:10:36 2019


Copyright:  © by the author
Author:  Hassan Aït-Kaci
Version:  Last modified on Thu Dec 12 11:12:31 2019 by hak


package hlt.math.matrix;

package hlt.math.matrix documentation listing



This defines the class DoublyStochasticMatrix as a subclass of Matrix which has only non-negative entries, and whose every row and column add up to 1.0 (and therefore, this entails that all its entries must be in [0.0,1.0]).

See also:  Matrix

public class DoublyStochasticMatrix extends Matrix
{
  public DoublyStochasticMatrix ()
  {
    super();    
  }

  public DoublyStochasticMatrix (int order)
  {
    super(order);    
  }

  public DoublyStochasticMatrix (double[][] data)
  {
    setData(data);
  }

  public DoublyStochasticMatrix setData (double[][] data)
  {
    if (!isDoublyStochastic(data))
      throw new RuntimeException
	("Non-doubly-stochastic data array may not be used for a DoublyStochasticMatrix");

    super.setData(data);
    
    return this;
  }

  /* ******************************************************************** */
}


This file was generated on Wed Dec 18 03:37:41 PST 2019 from file DoublyStochasticMatrix.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci