Changes in lemon/hypercube_graph.h [784:9d6c3e8b2421:664:4137ef9aacc6] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/hypercube_graph.h
r784 r664 283 283 /// \brief Hypercube graph class 284 284 /// 285 /// HypercubeGraph implements a special graph type. The nodes of the286 /// graph are indexed with integers havingat most \c dim binary digits.285 /// This class implements a special graph type. The nodes of the graph 286 /// are indiced with integers with at most \c dim binary digits. 287 287 /// Two nodes are connected in the graph if and only if their indices 288 288 /// differ only on one position in the binary form. 289 /// This class is completely static and it needs constant memory space.290 /// Thus you can neither add nor delete nodes or edges, however291 /// the structure can be resized using resize().292 ///293 /// This type fully conforms to the \ref concepts::Graph "Graph concept".294 /// Most of its member functions and nested classes are documented295 /// only in the concept class.296 289 /// 297 290 /// \note The type of the indices is chosen to \c int for efficiency 298 291 /// reasons. Thus the maximum dimension of this implementation is 26 299 292 /// (assuming that the size of \c int is 32 bit). 293 /// 294 /// This graph type fully conforms to the \ref concepts::Graph 295 /// "Graph concept". 300 296 class HypercubeGraph : public ExtendedHypercubeGraphBase { 301 297 typedef ExtendedHypercubeGraphBase Parent; … … 307 303 /// Constructs a hypercube graph with \c dim dimensions. 308 304 HypercubeGraph(int dim) { construct(dim); } 309 310 /// \brief Resizes the graph311 ///312 /// This function resizes the graph. It fully destroys and313 /// rebuilds the structure, therefore the maps of the graph will be314 /// reallocated automatically and the previous values will be lost.315 void resize(int dim) {316 Parent::notifier(Arc()).clear();317 Parent::notifier(Edge()).clear();318 Parent::notifier(Node()).clear();319 construct(dim);320 Parent::notifier(Node()).build();321 Parent::notifier(Edge()).build();322 Parent::notifier(Arc()).build();323 }324 305 325 306 /// \brief The number of dimensions. … … 340 321 /// 341 322 /// Gives back the dimension id of the given edge. 342 /// It is in the range <tt>[0..dim-1]</tt>.323 /// It is in the [0..dim-1] range. 343 324 int dimension(Edge edge) const { 344 325 return Parent::dimension(edge); … … 348 329 /// 349 330 /// Gives back the dimension id of the given arc. 350 /// It is in the range <tt>[0..dim-1]</tt>.331 /// It is in the [0..dim-1] range. 351 332 int dimension(Arc arc) const { 352 333 return Parent::dimension(arc);
Note: See TracChangeset
for help on using the changeset viewer.