コード例 #1
0
ファイル: ConvexComponents.cs プロジェクト: utmath/Library
 public ConvexComponents(int n, double[][] kernelMatrix, double absEps, double relativeEps)
 {
     this.N            = n;
     this.AbsEps       = absEps;
     this.RelativeEps  = relativeEps;
     this.kernelMatrix = kernelMatrix;
     x             = new double[n];
     components    = new ConvexComponent[n + 1];
     bestLambdas   = new double[n + 1];
     matrix        = new double[n + 1][];
     vals          = new double[n + 1];
     kernelVector  = new double[n];
     twistedVector = new double[n];
     for (int i = 0; i < n + 1; i++)
     {
         matrix[i] = new double[n + 1];
     }
     r      = new double[n + 1];
     vector = new double[n + 1];
     for (int i = 0; i < n + 1; i++)
     {
         components[i] = new ConvexComponent(n);
     }//for i
     Count      = 0;
     MinorCycle = 0;
 }
コード例 #2
0
ファイル: ConvexComponent.cs プロジェクト: utmath/Library
 public virtual void Copy(ConvexComponent other, int n)
 {
     Lambda = 0;
     for (int i = 0; i < n; i++)
     {
         B[i] = other.B[i];
     }//for i
     data = other.Data;
 }