Changeset 747dbd9 in tol for tol_tests


Ignore:
Timestamp:
May 6, 2014, 10:21:34 AM (12 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
2741c88
Parents:
a915a03
Message:

Refs #1770

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6215 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol_tests/tol/LinearAlgebra/PolMatrix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tol_tests/tol/LinearAlgebra/PolMatrix/test_0001/check.tol

    ra915a03 r747dbd9  
    4242}));
    4343
     44Matrix x = GetNumeric([[X]]);
     45Matrix xP = GetNumeric([[XP]]);
    4446
     47Real quality.dif.xP = 1-MatMax(Abs(x-xP));
     48
     49Set X2 = DeepCopy([[X]],x*2);
     50Matrix x2 = GetNumeric([[X2]]);
     51Real quality.dif.x2 = 1-MatMax(Abs(x2-x*2));
     52
     53
  • tol_tests/tol/LinearAlgebra/PolMatrix/test_0002/check.tol

    ra915a03 r747dbd9  
    11#Require VariableChange;
     2#Require AlgLib;
     3#Require MPM;
    24
    35Real dim = 2;
    4 Real deg = 3;
     6Real deg = 2;
     7Real T = 100;
    58
    6 Matrix x = VariableChange::StableMatrixPolyn::
     9Matrix x = VariableChange::@StableMatrixPolyn::
    710  SquareSetGen.Rand(dim, deg, -1, 1, 0.001);
    811
    9 Set PHI = VariableChange::StableMatrixPolyn::
     12Set PHI = VariableChange::@StableMatrixPolyn::
    1013  DuffinSchurBinFact(dim, deg, (x));
    1114Polyn determinant = VecSer::PolynMatrixDeterminant(PHI);
    12 
    1315
    1416PolMatrix P = TabPol2PolMat(PHI);
    1517
    1618Polyn determinant_ = Determinant(P);
     19Set PHI.det.roots = MPM::@ModuleVAR::PolynRootsReport(determinant_);
     20Real root.abs.min = PHI.det.roots[1][3];
     21Real P.isStationary = PolMatIsStationary(P);
     22
     23Real inequality_constraint_ = -Log(StationaryValue(determinant));
     24
     25Matrix X = Rand(T,dim,-1,1);
     26
     27Matrix Y = P:X;
     28
     29
     30VMatrix C = CompanionMatrix(P);
     31Matrix eigen = AlgLib::CppTools::rmatrixevd.eigen(VMat2Mat(C));
     32Matrix eigen.module = Sqrt(eigen^2 * Col(1,1));
     33Real eigen.module.max = MatMax(eigen.module);
     34Real eigen.module.max.inv = 1/eigen.module.max;
     35
     36
     37/*
     38Real m = VRows(C);
     39Real S=10000*m;
     40VMatrix U = Gaussian(m,S,0,1);
     41VMatrix V = C*U;
     42VMatrix u2 = (U^2)*Constant(S,1,1/S);
     43VMatrix v2 = (V^2)*Constant(S,1,1/S);
     44VMatrix r2 = v2 $/ u2;
     45//VMatrix R = MtMSqr(V) $/ MtMSqr(U);
     46//Real VMatMax(R)
     47/* */
Note: See TracChangeset for help on using the changeset viewer.