Class LinearConstraints

java.lang.Object
com.polytechnik.kgo.LinearConstraints

public class LinearConstraints extends Object
A class to calculate various linear constraints. This version uses a special basis internally. There is probably a better implementation LinearConstraintsKraus that does not use a special basis.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static double[][]
    getOrthogonalAllProj0(int nC, int nX, double[] u, double[] fullBasis)
    All \(0=\mathrm{Herm}\left(\sum\limits_{k=0}^{nX-1}u_{jk}v_{ik}\right) \), nC*(nC+1)/2 conditions.
    static double[][]
    getOrthogonalOffdiag0DiagEq(int nC, int nX, double[] u, double[] fullBasis)
    Zero offdiagonal and all equal diagonal elements of the matrix \( \mathrm{Herm}\left(\sum\limits_{k=0}^{nX-1}u_{jk}v_{ik}\right) \), there are (nC-1)*(nC+2)/2 conditions.
    static double[][]
    getVectorOrthogonal(int nC, int nX, double[] u, double[] fullBasis)
    Zero scalar product \( 0=\sum\limits_{j=0}^{nC-1}\sum\limits_{k=0}^{nX-1} u_{jk}v_{jk} \), a single conditions.
    (package private) static void
    testConstraintsOK_getOrthogonalOffdiag0DiagEq(int nC, int nX, double[] u, double[] v, double eps)
    Check a matrix for: all offdiag 0, all diag are the same.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LinearConstraints

      public LinearConstraints()
  • Method Details

    • getVectorOrthogonal

      public static double[][] getVectorOrthogonal(int nC, int nX, double[] u, double[] fullBasis)
      Zero scalar product \( 0=\sum\limits_{j=0}^{nC-1}\sum\limits_{k=0}^{nX-1} u_{jk}v_{jk} \), a single conditions.
    • getOrthogonalAllProj0

      static double[][] getOrthogonalAllProj0(int nC, int nX, double[] u, double[] fullBasis)
      All \(0=\mathrm{Herm}\left(\sum\limits_{k=0}^{nX-1}u_{jk}v_{ik}\right) \), nC*(nC+1)/2 conditions. Used for unit tests.
    • getOrthogonalOffdiag0DiagEq

      public static double[][] getOrthogonalOffdiag0DiagEq(int nC, int nX, double[] u, double[] fullBasis)
      Zero offdiagonal and all equal diagonal elements of the matrix \( \mathrm{Herm}\left(\sum\limits_{k=0}^{nX-1}u_{jk}v_{ik}\right) \), there are (nC-1)*(nC+2)/2 conditions.
    • testConstraintsOK_getOrthogonalOffdiag0DiagEq

      static void testConstraintsOK_getOrthogonalOffdiag0DiagEq(int nC, int nX, double[] u, double[] v, double eps)
      Check a matrix for: all offdiag 0, all diag are the same.