COIN-OR::LEMON - Graph Library

Changeset 226:616bc397c83a in lemon-0.x for src/work/klao/path_test.cc


Ignore:
Timestamp:
03/21/04 18:09:16 (20 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@323
Message:

Reszutas konstruktorok

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/klao/path_test.cc

    r225 r226  
    110110  }
    111111
     112  {
     113    cout << "Reszut letrehozasa: [2. el, 4. el)..." << endl;
     114    LPath P2(P, P.nth<EdgeIt>(1), P.nth<EdgeIt>(3));
     115
     116    cout << "P2.length() == " << P2.length() << endl;
     117    check(P2.length() == 2);
     118   
     119    cout << "P2.from()==v1 ? " << (P2.from()==v1) << endl;
     120    check(P2.from() == v1);
     121    cout << "P2.to()==v3 ? " << (P2.to()==v3) << endl;
     122    check(P2.to() == v3);
     123  }
     124  {
     125    cout << "Reszut letrehozasa: [1. el, 6. el)..." << endl;
     126    LPath P2(P, P.nth<EdgeIt>(0), P.nth<EdgeIt>(5));
     127
     128    cout << "P2.length() == " << P2.length() << endl;
     129    check(P2.length() == 5);
     130   
     131    cout << "P2.from()==s ? " << (P2.from()==s) << endl;
     132    check(P2.from() == s);
     133    cout << "P2.to()==t ? " << (P2.to()==t) << endl;
     134    check(P2.to() == t);
     135  }
     136
     137  {
     138    cout << "Ket pont altal megadott reszut letrehozasa: [2. pont, 4. pont]..."
     139         << endl;
     140    LPath P2(P, P.nth<NodeIt>(1), P.nth<NodeIt>(3));
     141
     142    cout << "P2.length() == " << P2.length() << endl;
     143    check(P2.length() == 2);
     144   
     145    cout << "P2.from()==v1 ? " << (P2.from()==v1) << endl;
     146    check(P2.from() == v1);
     147    cout << "P2.to()==v3 ? " << (P2.to()==v3) << endl;
     148    check(P2.to() == v3);
     149  }
     150  {
     151    cout << "Egy pontu reszut letrehozasa: [4. pont, 4. pont]..."
     152         << endl;
     153    LPath P2(P, P.nth<NodeIt>(3), P.nth<NodeIt>(3));
     154
     155    cout << "P2.length() == " << P2.length() << endl;
     156    check(P2.length() == 0);
     157   
     158    cout << "P2.from()==v3 ? " << (P2.from()==v3) << endl;
     159    check(P2.from() == v3);
     160    cout << "P2.to()==v3 ? " << (P2.to()==v3) << endl;
     161    check(P2.to() == v3);
     162  }
     163  {
     164    cout << "Forditott ut letrehozasa: [6. pont, 1. pont]..."
     165         << endl;
     166    LPath P2(P, P.nth<NodeIt>(5), P.nth<NodeIt>(0));
     167
     168    cout << "P2.length() == " << P2.length() << endl;
     169    check(P2.length() == 5);
     170   
     171    cout << "P2.from()==t ? " << (P2.from()==t) << endl;
     172    check(P2.from() == t);
     173    cout << "P2.to()==s ? " << (P2.to()==s) << endl;
     174    check(P2.to() == s);
     175  }
    112176
    113177
Note: See TracChangeset for help on using the changeset viewer.