00001
00002 #line 6220 "MIN_CYCLE_BASIS.lw"
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #line 1073 "MIN_CYCLE_BASIS.lw"
00039
00043 #ifndef SPVECGF2_H
00044 #define SPVECGF2_H
00045
00046 #include <iostream>
00047
00048 #ifdef LEDA_GE_V5
00049 #include <LEDA/system/basic.h>
00050 #include <LEDA/core/list.h>
00051 #include <LEDA/core/d_int_set.h>
00052 #include <LEDA/system/error.h>
00053 #include <LEDA/system/assert.h>
00054 #else
00055 #include <LEDA/basic.h>
00056 #include <LEDA/list.h>
00057 #include <LEDA/d_int_set.h>
00058 #include <LEDA/error.h>
00059 #include <LEDA/assert.h>
00060 #endif
00061 #include <LEP/mcb/edge_num.h>
00062 #include <LEP/mcb/arithm.h>
00063
00064 namespace mcb
00065 {
00066
00067 #if defined(LEDA_NAMESPACE)
00068 using leda::list;
00069 using leda::list_item;
00070 using leda::error_handler;
00071 using leda::d_int_set;
00072 #endif
00073
00074
00075 #line 1137 "MIN_CYCLE_BASIS.lw"
00076
00114 class spvecgf2
00115 {
00116 public:
00118
00119 spvecgf2();
00120
00122 spvecgf2( const spvecgf2 & a );
00123
00125 ~spvecgf2( );
00127
00128
00130
00134 spvecgf2& operator=( const spvecgf2& i );
00135
00137 spvecgf2& operator=( const int& i );
00138
00143 #if (__LEDA__ >= 500)
00144 spvecgf2& operator=( const d_int_set& i );
00145 #else
00146 spvecgf2& operator=( d_int_set& i );
00147 #endif
00148
00152 spvecgf2 operator-( ) const;
00153
00158 int operator*( const spvecgf2& a ) const;
00159
00164 spvecgf2 operator+( const spvecgf2& a ) const;
00165
00169 void add( const spvecgf2& a );
00170
00176 spvecgf2 operator%( const spvecgf2& a ) const;
00177
00183 d_int_set operator%( const d_int_set& a ) const;
00184
00189 spvecgf2 intersect( const spvecgf2& a ) const;
00190
00195 spvecgf2& operator+=( const spvecgf2& a );
00196
00202 spvecgf2& operator-=( const spvecgf2& a );
00203
00209 spvecgf2& operator%=( const spvecgf2& a );
00210
00215 void spvecgf2::swap( spvecgf2& a );
00217
00219
00222 d_int_set to_d_int_set() const;
00223
00227 list<int> to_list() const { return l; }
00229
00231
00232 void clear( ) { l.clear(); }
00233
00237 void print( std::ostream & o ) const;
00238
00246 void append( int index );
00247
00255 void insert( int index );
00256
00261 int pop() { return l.pop(); }
00262
00267 void sort() { l.sort(); }
00268
00269
00270 #line 1337 "MIN_CYCLE_BASIS.lw"
00271
00272
00276 bool empty() const { return l.empty(); }
00277
00281 int size( ) const { return l.size(); }
00283
00285
00291 list_item first( ) const { return l.first(); }
00292
00299 list_item last( ) const { return l.last(); }
00300
00306 list_item succ( list_item it ) const { return l.succ(it); }
00307
00313 list_item pred( list_item it ) const { return l.pred(it); }
00314
00320 int index( list_item it ) const { return l.contents(it); }
00321
00327 int inf( list_item it ) const { return l.contents(it); }
00328
00329
00330 typedef list_item item;
00331
00332 item first_item() const { return l.first(); }
00333 item last_item() const { return l.last(); }
00334 item next_item(item it) const { return it ? l.succ(it) : 0; }
00336
00337 private:
00338
00339 list < int > l;
00340 };
00341
00347 std::ostream & operator<<( std::ostream & o, const spvecgf2& v );
00348
00354 std::istream & operator>>( std::istream & o, spvecgf2& v );
00355
00356
00357 void swap( spvecgf2&, spvecgf2& );
00358
00359
00360
00361 #line 1110 "MIN_CYCLE_BASIS.lw"
00362 }
00363
00364 #endif
00365
00366 #line 6217 "MIN_CYCLE_BASIS.lw"
00367
00368
00369