COIN-OR::LEMON - Graph Library

Changeset 559:c5fd2d996909 in lemon-1.2 for lemon/graph_to_eps.h


Ignore:
Timestamp:
03/29/09 23:08:20 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Various doc improvements (#248)

  • Rename all the ugly template parameters (too long and/or starting with an underscore).
  • Rename function parameters starting with an underscore.
  • Extend the doc for many classes.
  • Use LaTeX-style O(...) expressions only for the complicated ones.
  • A lot of small unification changes.
  • Small fixes.
  • Some other improvements.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_to_eps.h

    r515 r559  
    6565///Default traits class of \ref GraphToEps.
    6666///
    67 ///\c G is the type of the underlying graph.
    68 template<class G>
     67///\param GR is the type of the underlying graph.
     68template<class GR>
    6969struct DefaultGraphToEpsTraits
    7070{
    71   typedef G Graph;
     71  typedef GR Graph;
    7272  typedef typename Graph::Node Node;
    7373  typedef typename Graph::NodeIt NodeIt;
     
    140140
    141141  ///Constructor
    142   ///\param _g  Reference to the graph to be printed.
    143   ///\param _os Reference to the output stream.
    144   ///\param _os Reference to the output stream.
     142  ///\param gr  Reference to the graph to be printed.
     143  ///\param ost Reference to the output stream.
    145144  ///By default it is <tt>std::cout</tt>.
    146   ///\param _pros If it is \c true, then the \c ostream referenced by \c _os
     145  ///\param pros If it is \c true, then the \c ostream referenced by \c os
    147146  ///will be explicitly deallocated by the destructor.
    148   DefaultGraphToEpsTraits(const G &_g,std::ostream& _os=std::cout,
    149                           bool _pros=false) :
    150     g(_g), os(_os),
     147  DefaultGraphToEpsTraits(const GR &gr, std::ostream& ost = std::cout,
     148                          bool pros = false) :
     149    g(gr), os(ost),
    151150    _coords(dim2::Point<double>(1,1)), _nodeSizes(1), _nodeShapes(0),
    152151    _nodeColors(WHITE), _arcColors(BLACK),
     
    159158    _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
    160159    _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
    161     _undirected(lemon::UndirectedTagIndicator<G>::value),
    162     _pleaseRemoveOsStream(_pros), _scaleToA4(false),
     160    _undirected(lemon::UndirectedTagIndicator<GR>::value),
     161    _pleaseRemoveOsStream(pros), _scaleToA4(false),
    163162    _nodeTextColorType(SAME_COL), _nodeTextColors(BLACK),
    164163    _autoNodeScale(false),
     
    11351134///to the end of the parameter list.
    11361135///\sa GraphToEps
    1137 ///\sa graphToEps(G &g, const char *file_name)
    1138 template<class G>
    1139 GraphToEps<DefaultGraphToEpsTraits<G> >
    1140 graphToEps(G &g, std::ostream& os=std::cout)
     1136///\sa graphToEps(GR &g, const char *file_name)
     1137template<class GR>
     1138GraphToEps<DefaultGraphToEpsTraits<GR> >
     1139graphToEps(GR &g, std::ostream& os=std::cout)
    11411140{
    11421141  return
    1143     GraphToEps<DefaultGraphToEpsTraits<G> >(DefaultGraphToEpsTraits<G>(g,os));
     1142    GraphToEps<DefaultGraphToEpsTraits<GR> >(DefaultGraphToEpsTraits<GR>(g,os));
    11441143}
    11451144
     
    11481147///\ingroup eps_io
    11491148///This function does the same as
    1150 ///\ref graphToEps(G &g,std::ostream& os)
     1149///\ref graphToEps(GR &g,std::ostream& os)
    11511150///but it writes its output into the file \c file_name
    11521151///instead of a stream.
    1153 ///\sa graphToEps(G &g, std::ostream& os)
    1154 template<class G>
    1155 GraphToEps<DefaultGraphToEpsTraits<G> >
    1156 graphToEps(G &g,const char *file_name)
     1152///\sa graphToEps(GR &g, std::ostream& os)
     1153template<class GR>
     1154GraphToEps<DefaultGraphToEpsTraits<GR> >
     1155graphToEps(GR &g,const char *file_name)
    11571156{
    11581157  std::ostream* os = new std::ofstream(file_name);
     
    11611160    throw IoError("Cannot write file", file_name);
    11621161  }
    1163   return GraphToEps<DefaultGraphToEpsTraits<G> >
    1164     (DefaultGraphToEpsTraits<G>(g,*os,true));
     1162  return GraphToEps<DefaultGraphToEpsTraits<GR> >
     1163    (DefaultGraphToEpsTraits<GR>(g,*os,true));
    11651164}
    11661165
     
    11691168///\ingroup eps_io
    11701169///This function does the same as
    1171 ///\ref graphToEps(G &g,std::ostream& os)
     1170///\ref graphToEps(GR &g,std::ostream& os)
    11721171///but it writes its output into the file \c file_name
    11731172///instead of a stream.
    1174 ///\sa graphToEps(G &g, std::ostream& os)
    1175 template<class G>
    1176 GraphToEps<DefaultGraphToEpsTraits<G> >
    1177 graphToEps(G &g,const std::string& file_name)
     1173///\sa graphToEps(GR &g, std::ostream& os)
     1174template<class GR>
     1175GraphToEps<DefaultGraphToEpsTraits<GR> >
     1176graphToEps(GR &g,const std::string& file_name)
    11781177{
    11791178  std::ostream* os = new std::ofstream(file_name.c_str());
     
    11821181    throw IoError("Cannot write file", file_name);
    11831182  }
    1184   return GraphToEps<DefaultGraphToEpsTraits<G> >
    1185     (DefaultGraphToEpsTraits<G>(g,*os,true));
     1183  return GraphToEps<DefaultGraphToEpsTraits<GR> >
     1184    (DefaultGraphToEpsTraits<GR>(g,*os,true));
    11861185}
    11871186
Note: See TracChangeset for help on using the changeset viewer.