Changeset aa1e2cc in tol
- Timestamp:
- Nov 27, 2009, 10:16:22 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 6cea4d2
- Parents:
- 345a4d7
- Location:
- tol_pkg
- Files:
-
- 7 edited
-
GisTools/test/test_0001/test.tol (modified) (2 diffs)
-
GraphTools/test/test_0001/test.tol (modified) (2 diffs)
-
GraphTools/test/test_0002/test.tol (modified) (2 diffs)
-
MatQuery/test/test_0001/test.tol (modified) (6 diffs)
-
MatQuery/test/test_0002/test.tol (modified) (1 diff)
-
MatQuery/test/test_0003/test.tol (modified) (1 diff)
-
MulVarFunAprox/test/test_0001/test.tol (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol_pkg/GisTools/test/test_0001/test.tol
r345a4d7 raa1e2cc 76 76 Real eval.p0 = i2dg::eval(p0); 77 77 78 NameBlock i2dg::evaluate(p0);79 78 80 79 /* 80 NameBlock i2dg::evaluate(p0); 81 81 GisTools::@Point2D.Simple p = p0; 82 82 Set _.x.range = i2dg::_.x.range; … … 86 86 VMatrix _.F = i2dg::_.F; 87 87 88 /* 88 */ 89 89 90 90 Real numErr1 = Copy(NError); 91 91 Real numWar1 = Copy(NWarning); 92 92 93 Set partialResults_ = [[numErr0, numErr1, 94 ok.1, ok.2]]; 93 Set partialResults_ = [[numErr0, numErr1]]; 95 94 96 95 //This is a messure of the success of the test 97 Real quality_ = And(numErr1 == numErr0, 98 numWar1 == numWar0, 99 ok.1, ok.2); 96 Real quality_ = And(numErr1 == numErr0); 100 97 101 98 //Return the results -
tol_pkg/GraphTools/test/test_0001/test.tol
r345a4d7 raa1e2cc 7 7 Text summary_ = "checking a simple graph"; 8 8 9 #Require GraphTools; 10 //#Embed "../../../_embed_all.tol"; 11 9 12 //Write here the initial test TOL code if needed 10 13 Real numErr0 = Copy(NError); … … 14 17 Real removeRepeatedEdges = True; 15 18 16 #Require GraphTools;17 //#Embed "../../../_embed_all.tol";18 19 19 20 #Embed "../define.random.graph.tol"; -
tol_pkg/GraphTools/test/test_0002/test.tol
r345a4d7 raa1e2cc 6 6 Text link_ = ""; 7 7 Text summary_ = "checking a simple graph"; 8 9 #Require GraphTools; 10 //#Embed "../../../_embed_all.tol"; 8 11 9 12 //Write here the initial test TOL code if needed … … 15 18 Real edge.num = 20000; 16 19 Real removeRepeatedEdges = True; 17 18 #Require GraphTools;19 //#Embed "../../../_embed_all.tol";20 20 21 21 #Embed "../define.random.graph.tol"; -
tol_pkg/MatQuery/test/test_0001/test.tol
r345a4d7 raa1e2cc 9 9 Text summary_ = "checking matrix row selection"; 10 10 11 #Require MatQuery; 12 //#Embed "../../../_embed_all.tol"; 13 11 14 //Write here the initial test TOL code if needed 12 15 Real numErr0 = Copy(NError); … … 18 21 WriteLn("Current Random Seed = "<<rndSeed); 19 22 20 #Require MatQuery;21 //#Embed "../../../_embed_all.tol";22 23 23 24 //The order of magnitude required for number of geographic points … … 69 70 VMatrix points = Mat2VMat(BinGroup("<<",city.points)); 70 71 72 71 73 //Target point 72 74 VMatrix p0 = SubRow(points,[[IntRand(1,point.num)]])+ … … 79 81 points, p0, distance); 80 82 VMatrix p0.select.HC = SubRow(points,p0.select.idx.HC); 83 81 84 Real t1 = Copy(Time); 82 85 WriteLn("SelectRowsInHyperCube full "<<VRows(p0.select.HC)+" items " … … 88 91 points, p0, distance); 89 92 VMatrix p0.select.HE.1 = SubRow(points,p0.select.idx.HE.1); 93 90 94 Real t2 = Copy(Time); 91 95 WriteLn("SelectRowsInHyperSphere full "<<VRows(p0.select.HE.1)+" items " … … 106 110 Card(p0.select.idx.HE.1 * p0.select.idx.HC) == 107 111 Card(p0.select.idx.HE.1)); 112 108 113 Real ok.2 = VMatMax(Abs(p0.select.HE.2-p0.select.HE.1))==0; 109 114 -
tol_pkg/MatQuery/test/test_0002/test.tol
r345a4d7 raa1e2cc 9 9 Text summary_ = "checking matrix row selection"; 10 10 11 #Require MatQuery; 12 //#Embed "../../../_embed_all.tol"; 13 11 14 //Write here the initial test TOL code if needed 12 15 Real numErr0 = Copy(NError); 13 16 Real numWar0 = Copy(NWarning); 14 15 #Require MatQuery;16 //#Embed "../../../_embed_all.tol";17 17 18 18 Real t1 = Copy(Time); -
tol_pkg/MatQuery/test/test_0003/test.tol
r345a4d7 raa1e2cc 9 9 Text summary_ = "checking matrix row selection of unknown values"; 10 10 11 //#Require MatQuery; 12 //#Embed "../../../_embed_all.tol"; 13 11 14 //Write here the initial test TOL code if needed 12 15 Real numErr0 = Copy(NError); 13 16 Real numWar0 = Copy(NWarning); 14 17 15 #Require MatQuery;16 //#Embed "../../../_embed_all.tol";17 18 18 Real t1 = Copy(Time); 19 19 Real rndSeed = 0; 20 20 Real m = 300; 21 Real n = 10; 21 22 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));23 VMatrix unk.match = LE(Rand(m,n,0,1),Rand(m,n,1,1)*.20); 24 VMatrix M = IfVMat(unk.match, Rand(m,n,1,1)*?, Rand(m,n,-10,10)); 24 25 25 VMatrix unk.match_ = MatQuery::MatchRowsWithValue(M,?); 26 Real ok.1 = VMatMax(Abs(unk.match-unk.match))==0; 26 VMatrix M.unk = Min(IsUnknown(M)*Rand(n,1,1,1), Rand(m,1,1,1)); 27 27 28 Set sel.known = MatQuery::SelectMatch(Not(unk.match_)); 28 VMatrix M.rows.known = Pack(Not(IsUnknown(M)*Rand(n,1,1,1))); 29 VMatrix M.rows.unknown = Pack(Not(M.rows.known)); 30 VMatrix M.rows.known_= MatQuery::MatchRowsFullKnown(M); 29 31 30 VMatrix extract.known = SubRow(M, sel.known); 32 VMatrix unk.match.1 = LE(Rand(m,1,0,1),Rand(m,1,1,1)*.20); 33 VMatrix M1 = IfVMat(unk.match.1, Rand(m,1,1,1)*?, Rand(m,1,-10,10)); 34 35 VMatrix unk.match.1_ = MatQuery::MatchRowsWithValue(M1,?); 36 Real ok.1 = VMatMax(Abs(unk.match.1-unk.match.1))==0; 37 38 Set sel.known = MatQuery::SelectMatch(Not(unk.match.1_)); 39 40 VMatrix extract.known = SubRow(M1, sel.known); 31 41 32 42 Real ok.2 = VMatSum(IsUnknown(extract.known))==0; 33 Real ok.3 = VRows(extract.known)==m-VMatSum(unk.match );43 Real ok.3 = VRows(extract.known)==m-VMatSum(unk.match.1); 34 44 35 45 -
tol_pkg/MulVarFunAprox/test/test_0001/test.tol
r345a4d7 raa1e2cc 18 18 WriteLn("Current Random Seed = "<<rndSeed); 19 19 20 //#Require MulVarFunAprox;21 #Embed "../../../_embed_all.tol";20 #Require MulVarFunAprox; 21 //#Embed "../../../_embed_all.tol"; 22 22 23 23 Real n = 2; … … 94 94 /* */ 95 95 96 Real J = K*100 00;96 Real J = K*100; 97 97 98 98 VMatrix X = Group("ConcatColumns",For(1,n,VMatrix(Real i)
Note: See TracChangeset
for help on using the changeset viewer.
