Changeset 4e5fa43 in tol


Ignore:
Timestamp:
Nov 9, 2009, 3:19:56 PM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
38b5031
Parents:
b0c13fe
Message:

Reducing cost of ClassifyColumnByRank

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol_pkg/GisTools/_GisTools.tol

    rb0c13fe r4e5fa43  
    7777  Set rnk = SetOfReal(min)<<rankBound<<SetOfReal(max);
    7878  VMatrix class = Zeros(m,1);
     79  VMatrix vM = Mat2VMat(M);
    7980  Real r = 1;
     81  VMatrix constant = Rand(m,1,1,1);
    8082  While(r<=R+1,
    8183  {
    82     Matrix  left  = Rand(m,1,rnk[r  ],rnk[r  ]);
    83     Matrix  right = Rand(m,1,rnk[r+1],rnk[r+1]);
    84     VMatrix left.match = Mat2VMat(LE(left,M));
    85     VMatrix right.match = Mat2VMat(LT(M,right));
     84    VMatrix left.match = LE(constant*rnk[r],vM);
     85    VMatrix right.match = LT(vM,constant*rnk[r+1]);
    8686    VMatrix class := class + And(left.match,right.match)*r;
    8787    Real r := r+1
Note: See TracChangeset for help on using the changeset viewer.