Changeset 2b60aab in tol for tol_pkg


Ignore:
Timestamp:
Nov 7, 2009, 4:41:18 PM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
4d44f38
Parents:
9642924
Message:

Adding member Set @Graph::get.vertex.names(Real void)

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

Location:
tol_pkg/graphtools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tol_pkg/graphtools/graphtools.tol

    r9642924 r2b60aab  
    304304  {
    305305    _.edge::get.all(idx)
     306  };
     307
     308  ////////////////////////////////////////////////////////////////////////////
     309  Set get.vertex.names(Real void)
     310  ////////////////////////////////////////////////////////////////////////////
     311  {
     312    ((_.vertex::_.feature)[1])::_.domain
    306313  }
    307 
    308314}
    309315
  • tol_pkg/graphtools/test/test_0001/test.tol

    r9642924 r2b60aab  
    55
    66Text email_ = "vdebuen@tol-project.org";
     7Text link_ = "";
    78Text summary_ = "checking a simple graph";
    89
    … …  
    2324GraphTools::@Graph graph = GraphTools::@Graph::New("test_0001",True);
    2425
    25 Real graph::initialize(Set { vertex.names = For(1,vertex.num,Text(Real k)
     26Set vertex.names = For(1,vertex.num,Text(Real k)
    2627{
    27    "Key_"<<FormatReal(k,"0%6.0f")<<
     28   "Key_"<<FormatReal(k,"%06.0f")<<
    2829       "_"+FormatReal(IntRand(0,999999999),"%09.0lf")
    29 })});
     30});
     31
     32Real graph::initialize(vertex.names);
    3033
    3134Real graph::_.edge::add.feature.numeric("Length");
    … …  
    4043Real graph::edge.build(data);
    4144
    42 
    4345Real edge.idx = IntRand(1,edge.num);
    4446Set edge.info = graph::edge.get.all(edge.idx);
    … …  
    5254Real ok.1 = edge.idx.1==edge.idx;
    5355Real ok.2 = edge.idx.2==edge.idx;
     56
     57Set vertex.names_ = graph::get.vertex.names(?);
     58
     59Real ok.3 = Card(vertex.names)==Card(vertex.names_);
    5460
    5561Real t1 = Copy(Time);
    … …  
    6773WriteLn("Loading OIS time "<<(t3-t2)+" seconds");
    6874
    69 /* 
    7075Real numErr1 = Copy(NError);
    7176Real numWar1 = Copy(NWarning);
    7277
    73 Set partialResults_ = [[numErr0, numErr1, ok]];
     78Set partialResults_ = [[numErr0, numErr1,
     79                        ok.1, ok.2, ok.3]];
    7480
    7581//This is a messure of the success of the test
    7682Real quality_ = And(numErr1 == numErr0,
    7783                    numWar1 == numWar0,
    78                     ok);
     84                    ok.1, ok.2, ok.3);
    7985
    8086//Return the results
Note: See TracChangeset for help on using the changeset viewer.