mcb.h

Go to the documentation of this file.
00001 #line 6220 "MIN_CYCLE_BASIS.lw"
00002 //---------------------------------------------------------------------
00003 // File automatically generated using notangle from DMIN_CYCLE_BASIS.lw
00004 //
00005 // emails and bugs: Dimitris Michail <michail@mpi-inf.mpg.de>
00006 //---------------------------------------------------------------------
00007 //
00008 // This program can be freely used in an academic environment
00009 // ONLY for research purposes, subject to the following restrictions:
00010 //
00011 // 1. The origin of this software must not be misrepresented; you must not
00012 //    claim that you wrote the original software. If you use this software
00013 //    an acknowledgment in the product documentation is required.
00014 // 2. Altered source versions must be plainly marked as such, and must not be
00015 //    misrepresented as being the original software.
00016 // 3. This notice may not be removed or altered from any source distribution.
00017 //
00018 // Any other use is strictly prohibited by the author, without an explicit 
00019 // permission.
00020 //
00021 // Note that this program uses the LEDA library, which is NOT free. For more 
00022 // details visit Algorithmic Solutions at http://www.algorithmic-solutions.com/
00023 //
00024 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00025 // ! Any commercial use of this software is strictly !
00026 // ! prohibited without explicit permission by the   !
00027 // ! author.                                         !
00028 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00029 //
00030 // This software is distributed in the hope that it will be useful,
00031 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00032 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00033 //
00034 // Copyright (C) 2004-2005 - Dimitris Michail <michail@mpi-inf.mpg.de>
00035 
00036 
00037 #line 395 "MIN_CYCLE_BASIS.lw"
00038 
00184 #ifndef MCB_H
00185 #define MCB_H
00186 
00187 #include <LEP/mcb/min_cycle_basis.h>
00188 #include <LEP/mcb/dir_min_cycle_basis.h>
00189 
00193 namespace mcb 
00194 { 
00195 
00219 template<class W>
00220 W MCB( const leda::graph& g, const leda::edge_array<W>& len, 
00221        leda::array< leda::list<leda::edge> >& mcb, double errorp=0.375 ) 
00222 {
00223     if ( g.is_undirected() ) { // undirected graph
00224         return MIN_CYCLE_BASIS_DEPINA( g, len, mcb );
00225     }
00226     else { // directed graph
00227         return DIR_MIN_CYCLE_BASIS( g, len, mcb, errorp );
00228     }
00229 }
00230 
00252 int MCB( const graph& g, array< list<edge> >& mcb, double errorp = 0.375 ) 
00253 {
00254     if ( g.is_undirected() ) { // undirected graph
00255         return MIN_CYCLE_BASIS_DEPINA( g, mcb );
00256     }
00257     else { // directed graph
00258         leda::edge_array<int> len( g, 1);
00259         return DIR_MIN_CYCLE_BASIS( g, len, mcb, errorp );
00260     }
00261 }
00262     
00263 } // end of namespace mcb
00264 
00265 
00266 #endif  // MCB_H
00267 
00268 #line 6217 "MIN_CYCLE_BASIS.lw"
00269 /* ex: set ts=8 sw=4 sts=4 noet: */
00270 
00271 

Generated on Thu Mar 30 16:45:43 2006 for mcb LEDA Extension Package by  doxygen 1.4.6