Changeset aa1e2cc in tol


Ignore:
Timestamp:
Nov 27, 2009, 10:16:22 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
6cea4d2
Parents:
345a4d7
Message:

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

Location:
tol_pkg
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tol_pkg/GisTools/test/test_0001/test.tol

    r345a4d7 raa1e2cc  
    7676Real eval.p0 = i2dg::eval(p0);
    7777
    78 NameBlock i2dg::evaluate(p0);
    7978
    8079/*
     80NameBlock i2dg::evaluate(p0);
    8181GisTools::@Point2D.Simple p = p0;
    8282Set _.x.range = i2dg::_.x.range;
    … …  
    8686VMatrix _.F = i2dg::_.F;
    8787
    88 /*
     88*/
    8989
    9090Real numErr1 = Copy(NError);
    9191Real numWar1 = Copy(NWarning);
    9292
    93 Set partialResults_ = [[numErr0, numErr1,
    94                         ok.1, ok.2]];
     93Set partialResults_ = [[numErr0, numErr1]];
    9594
    9695//This is a messure of the success of the test
    97 Real quality_ = And(numErr1 == numErr0,
    98                     numWar1 == numWar0,
    99                     ok.1, ok.2);
     96Real quality_ = And(numErr1 == numErr0);
    10097
    10198//Return the results
  • tol_pkg/GraphTools/test/test_0001/test.tol

    r345a4d7 raa1e2cc  
    77Text summary_ = "checking a simple graph";
    88
     9  #Require GraphTools;
     10//#Embed "../../../_embed_all.tol";
     11
    912//Write here the initial test TOL code if needed
    1013Real numErr0 = Copy(NError);
    … …  
    1417Real removeRepeatedEdges = True;
    1518
    16   #Require GraphTools;
    17 //#Embed "../../../_embed_all.tol";
    1819
    1920#Embed "../define.random.graph.tol";
  • tol_pkg/GraphTools/test/test_0002/test.tol

    r345a4d7 raa1e2cc  
    66Text link_ = "";
    77Text summary_ = "checking a simple graph";
     8
     9  #Require GraphTools;
     10//#Embed "../../../_embed_all.tol";
    811
    912//Write here the initial test TOL code if needed
    … …  
    1518Real edge.num = 20000;
    1619Real removeRepeatedEdges = True;
    17 
    18   #Require GraphTools;
    19 //#Embed "../../../_embed_all.tol";
    2020
    2121#Embed "../define.random.graph.tol";
  • tol_pkg/MatQuery/test/test_0001/test.tol

    r345a4d7 raa1e2cc  
    99Text summary_ = "checking matrix row selection";
    1010
     11  #Require MatQuery;
     12//#Embed "../../../_embed_all.tol";
     13
    1114//Write here the initial test TOL code if needed
    1215Real numErr0 = Copy(NError);
    … …  
    1821WriteLn("Current Random Seed = "<<rndSeed);
    1922
    20   #Require MatQuery;
    21 //#Embed "../../../_embed_all.tol";
    2223
    2324//The order of magnitude required for number of geographic points
    … …  
    6970VMatrix points = Mat2VMat(BinGroup("<<",city.points));
    7071
     72
    7173//Target point
    7274VMatrix p0 = SubRow(points,[[IntRand(1,point.num)]])+
    … …  
    7981  points, p0, distance);
    8082VMatrix p0.select.HC = SubRow(points,p0.select.idx.HC);
     83
    8184Real t1 = Copy(Time);
    8285WriteLn("SelectRowsInHyperCube full "<<VRows(p0.select.HC)+" items "
    … …  
    8891  points, p0, distance);
    8992VMatrix p0.select.HE.1 = SubRow(points,p0.select.idx.HE.1);
     93
    9094Real t2 = Copy(Time);
    9195WriteLn("SelectRowsInHyperSphere full "<<VRows(p0.select.HE.1)+" items "
    … …  
    106110  Card(p0.select.idx.HE.1   *      p0.select.idx.HC) ==
    107111  Card(p0.select.idx.HE.1));
     112
    108113Real ok.2 = VMatMax(Abs(p0.select.HE.2-p0.select.HE.1))==0;
    109114
  • tol_pkg/MatQuery/test/test_0002/test.tol

    r345a4d7 raa1e2cc  
    99Text summary_ = "checking matrix row selection";
    1010
     11  #Require MatQuery;
     12//#Embed "../../../_embed_all.tol";
     13
    1114//Write here the initial test TOL code if needed
    1215Real numErr0 = Copy(NError);
    1316Real numWar0 = Copy(NWarning);
    14 
    15   #Require MatQuery;
    16 //#Embed "../../../_embed_all.tol";
    1717
    1818Real t1 = Copy(Time);
  • tol_pkg/MatQuery/test/test_0003/test.tol

    r345a4d7 raa1e2cc  
    99Text summary_ = "checking matrix row selection of unknown values";
    1010
     11//#Require MatQuery;
     12//#Embed "../../../_embed_all.tol";
     13
    1114//Write here the initial test TOL code if needed
    1215Real numErr0 = Copy(NError);
    1316Real numWar0 = Copy(NWarning);
    1417
    15 #Require MatQuery;
    16 //#Embed "../../../_embed_all.tol";
    17 
    1818Real t1 = Copy(Time);
    1919Real rndSeed = 0;
    2020Real m = 300;
     21Real n = 10;
    2122
    22 VMatrix unk.match = LE(Rand(m,1,0,1),Rand(m,1,1,1)*.20);
    23 VMatrix M = IfVMat(unk.match, Rand(m,1,1,1)*?, Rand(m,1,-10,10));
     23VMatrix unk.match = LE(Rand(m,n,0,1),Rand(m,n,1,1)*.20);
     24VMatrix M = IfVMat(unk.match, Rand(m,n,1,1)*?, Rand(m,n,-10,10));
    2425
    25 VMatrix unk.match_ = MatQuery::MatchRowsWithValue(M,?);
    26 Real ok.1 = VMatMax(Abs(unk.match-unk.match))==0;
     26VMatrix M.unk = Min(IsUnknown(M)*Rand(n,1,1,1), Rand(m,1,1,1));
    2727
    28 Set sel.known = MatQuery::SelectMatch(Not(unk.match_));
     28VMatrix M.rows.known = Pack(Not(IsUnknown(M)*Rand(n,1,1,1)));
     29VMatrix M.rows.unknown = Pack(Not(M.rows.known));
     30VMatrix M.rows.known_= MatQuery::MatchRowsFullKnown(M);
    2931
    30 VMatrix extract.known = SubRow(M, sel.known);
     32VMatrix unk.match.1 = LE(Rand(m,1,0,1),Rand(m,1,1,1)*.20);
     33VMatrix M1 = IfVMat(unk.match.1, Rand(m,1,1,1)*?, Rand(m,1,-10,10));
     34
     35VMatrix unk.match.1_ = MatQuery::MatchRowsWithValue(M1,?);
     36Real ok.1 = VMatMax(Abs(unk.match.1-unk.match.1))==0;
     37
     38Set sel.known = MatQuery::SelectMatch(Not(unk.match.1_));
     39
     40VMatrix extract.known = SubRow(M1, sel.known);
    3141
    3242Real ok.2 = VMatSum(IsUnknown(extract.known))==0;
    33 Real ok.3 = VRows(extract.known)==m-VMatSum(unk.match);
     43Real ok.3 = VRows(extract.known)==m-VMatSum(unk.match.1);
    3444
    3545
  • tol_pkg/MulVarFunAprox/test/test_0001/test.tol

    r345a4d7 raa1e2cc  
    1818WriteLn("Current Random Seed = "<<rndSeed);
    1919
    20 //#Require MulVarFunAprox;
    21 #Embed "../../../_embed_all.tol";
     20#Require MulVarFunAprox;
     21//#Embed "../../../_embed_all.tol";
    2222
    2323Real n = 2;
    … …  
    9494/* */
    9595
    96 Real J = K*10000;
     96Real J = K*100;
    9797
    9898VMatrix X = Group("ConcatColumns",For(1,n,VMatrix(Real i)
Note: See TracChangeset for help on using the changeset viewer.