Definition of the bipartite graph with specialized methods for the complex graph. More...
#include <algorithms/complex.h>
Classes | |
class | division_result_t |
Describe the result of a cell division. More... | |
Public Types | |
typedef ParentClass::vertex1_t | cell |
typedef ParentClass::edge1_t | cell_junction_edge |
typedef ParentClass::const_edge1_t | const_cell_junction_edge |
typedef ParentClass::const_iterator1 | const_iterator1 |
Constant iterator on the vertices of type 1. | |
typedef ParentClass::const_iterator2 | const_iterator2 |
Constant iterator on the vertices of type 1. | |
typedef ParentClass::const_edge2_t | const_junction_cell_edge |
typedef ParentClass::const_range_vertex1 | const_range_cell |
typedef ParentClass::const_range_vertex2 | const_range_junction |
typedef DivisionData < JunctionContent > | division_data |
Structure describing a cell division. | |
typedef ParentClass::iterator1 | iterator1 |
Iterator on the vertices of type 1. | |
typedef ParentClass::iterator2 | iterator2 |
Iterator on the vertices of type 2. | |
typedef ParentClass::vertex2_t | junction |
typedef ParentClass::edge2_t | junction_cell_edge |
typedef graph::VVBiGraph < COMPLEX_ARGS > | ParentClass |
typedef ParentClass::range_vertex1 | range_cell |
typedef ParentClass::range_vertex2 | range_junction |
typedef ParentClass::size_type | size_type |
Type of a size. | |
Public Member Functions | |
template<typename JunctionContainer > | |
bool | addCell (const cell &c, const JunctionContainer &junctions) |
bool | addCell (const cell &c, const junction &j1, const junction &j2, const junction &j3, const junction &j4, const junction &j5, const junction &j6, const junction &j7, const junction &j8, const junction &j9) |
Add a new cell with nine vertices to the complex. | |
bool | addCell (const cell &c, const junction &j1, const junction &j2, const junction &j3, const junction &j4, const junction &j5, const junction &j6, const junction &j7, const junction &j8) |
Add a new cell with height vertices to the complex. | |
bool | addCell (const cell &c, const junction &j1, const junction &j2, const junction &j3, const junction &j4, const junction &j5, const junction &j6, const junction &j7) |
Add a new cell with seven vertices to the complex. | |
bool | addCell (const cell &c, const junction &j1, const junction &j2, const junction &j3, const junction &j4, const junction &j5, const junction &j6) |
Add a new cell with six vertices to the complex. | |
bool | addCell (const cell &c, const junction &j1, const junction &j2, const junction &j3, const junction &j4, const junction &j5) |
Add a new cell with five vertices to the complex. | |
bool | addCell (const cell &c, const junction &j1, const junction &j2, const junction &j3, const junction &j4) |
Add a new cell with four vertices to the complex. | |
bool | addCell (const cell &c, const junction &j1, const junction &j2, const junction &j3) |
Add a new cell with three vertices to the complex. | |
const cell & | adjacentCell (const cell &c, const junction &j) const |
Returns the cell adjacent the c sharing the wall (j, S.nextTo(c,j)). | |
std::pair< cell, cell > | adjacentCells (const junction &j1, const junction &j2) const |
Returns the cell(s) sharing the wall (j1,j2). | |
const cell & | any_cell () const |
Returns a cell from the complex graph. | |
const junction & | any_junction () const |
Retrns a junction from the complex graph. | |
bool | border (const junction &j1, const junction &j2) const |
bool | border (const cell &c) const |
Test if a junction is at the border of the complex graph. | |
bool | border (const junction &j) const |
Test if a junction is at the border of the complex graph. | |
bool | border (const cell &c, const junction &j) const |
Test if the wall of the cell c starting at j is at the border of the complex graph. | |
std::vector< junction > | contour () const |
std::vector< junction > | deleteCell (const cell &c) |
Delete a cell and all the junctions that become orphans. | |
division_result_t | divideCell (const cell &c, const division_data &ddata) |
Divide a cell. | |
const cell & | get_cell (size_type idx) const |
Returns the cell number idx. | |
const junction & | get_junction (size_type idx) const |
Returns the junction number idx. | |
const junction & | interfaceWall (const cell &c1, const cell &c2) const |
std::pair< junction, junction > | interfaceWallSpan (const cell &c1, const cell &c2) const |
std::pair< junction, junction > | mergeCells (const cell &c1, const cell &c2, std::vector< junction > *deleted_junctions=0) |
Merge two adjacent cells. | |
size_t | nb_cells () const |
Returns the number of cells in the graph. | |
size_t | nb_junctions () const |
Returns the number of junctions in the graph. | |
std::vector< junction > | nextContourVertex (const junction &first, const cell &c, const junction &j, std::vector< junction > acc) const |
bool | no_cell () const |
True if there are no cells. | |
bool | no_junction () const |
True if there are no junctions. | |
const junction & | splitWall (const cell &c, const junction &j1, const junction &x=junction(0)) |
Split a wall in two and return the new junction. | |
const junction & | splitWall (const junction &j1, const junction &j2, const junction &x=junction(0)) |
Split a wall in two and return the new junction. | |
VVComplexGraph (const ParentClass &other) | |
STL iterators | |
const_iterator1 | begin_cells () const |
iterator1 | begin_cells () |
const_iterator2 | begin_junctions () const |
iterator2 | begin_junctions () |
const_range_cell | cells () const |
range_cell | cells () |
const_iterator1 | end_cells () const |
iterator1 | end_cells () |
const_iterator2 | end_junctions () const |
iterator2 | end_junctions () |
const_range_junction | junctions () const |
range_junction | junctions () |
Definition of the bipartite graph with specialized methods for the complex graph.
Definition at line 860 of file complex.h.
typedef ParentClass::const_iterator1 vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::const_iterator1 |
Constant iterator on the vertices of type 1.
Reimplemented from graph::VVBiGraph< COMPLEX_ARGS >.
typedef ParentClass::const_iterator2 vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::const_iterator2 |
Constant iterator on the vertices of type 1.
Reimplemented from graph::VVBiGraph< COMPLEX_ARGS >.
typedef DivisionData<JunctionContent> vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::division_data |
typedef ParentClass::iterator1 vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::iterator1 |
Iterator on the vertices of type 1.
Reimplemented from graph::VVBiGraph< COMPLEX_ARGS >.
typedef ParentClass::iterator2 vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::iterator2 |
Iterator on the vertices of type 2.
Reimplemented from graph::VVBiGraph< COMPLEX_ARGS >.
typedef ParentClass::size_type vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::size_type |
Type of a size.
Reimplemented from graph::VVBiGraph< COMPLEX_ARGS >.
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::addCell | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | j2, | |||
const junction & | j3, | |||
const junction & | j4, | |||
const junction & | j5, | |||
const junction & | j6, | |||
const junction & | j7, | |||
const junction & | j8, | |||
const junction & | j9 | |||
) | [inline] |
Add a new cell with nine vertices to the complex.
Definition at line 1040 of file complex.h.
01043 { 01044 std::vector<junction> junctions(9, junction(0)); 01045 junctions[0] = j1; 01046 junctions[1] = j2; 01047 junctions[2] = j3; 01048 junctions[3] = j4; 01049 junctions[4] = j5; 01050 junctions[5] = j6; 01051 junctions[6] = j7; 01052 junctions[7] = j8; 01053 junctions[8] = j9; 01054 return this->addCell(c, junctions); 01055 }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::addCell | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | j2, | |||
const junction & | j3, | |||
const junction & | j4, | |||
const junction & | j5, | |||
const junction & | j6, | |||
const junction & | j7, | |||
const junction & | j8 | |||
) | [inline] |
Add a new cell with height vertices to the complex.
Definition at line 1021 of file complex.h.
01024 { 01025 std::vector<junction> junctions(8, junction(0)); 01026 junctions[0] = j1; 01027 junctions[1] = j2; 01028 junctions[2] = j3; 01029 junctions[3] = j4; 01030 junctions[4] = j5; 01031 junctions[5] = j6; 01032 junctions[6] = j7; 01033 junctions[7] = j8; 01034 return this->addCell(c, junctions); 01035 }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::addCell | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | j2, | |||
const junction & | j3, | |||
const junction & | j4, | |||
const junction & | j5, | |||
const junction & | j6, | |||
const junction & | j7 | |||
) | [inline] |
Add a new cell with seven vertices to the complex.
Definition at line 1004 of file complex.h.
01006 { 01007 std::vector<junction> junctions(7, junction(0)); 01008 junctions[0] = j1; 01009 junctions[1] = j2; 01010 junctions[2] = j3; 01011 junctions[3] = j4; 01012 junctions[4] = j5; 01013 junctions[5] = j6; 01014 junctions[6] = j7; 01015 return this->addCell(c, junctions); 01016 }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::addCell | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | j2, | |||
const junction & | j3, | |||
const junction & | j4, | |||
const junction & | j5, | |||
const junction & | j6 | |||
) | [inline] |
Add a new cell with six vertices to the complex.
Definition at line 988 of file complex.h.
00990 { 00991 std::vector<junction> junctions(6, junction(0)); 00992 junctions[0] = j1; 00993 junctions[1] = j2; 00994 junctions[2] = j3; 00995 junctions[3] = j4; 00996 junctions[4] = j5; 00997 junctions[5] = j6; 00998 return this->addCell(c, junctions); 00999 }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::addCell | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | j2, | |||
const junction & | j3, | |||
const junction & | j4, | |||
const junction & | j5 | |||
) | [inline] |
Add a new cell with five vertices to the complex.
Definition at line 973 of file complex.h.
00975 { 00976 std::vector<junction> junctions(5, junction(0)); 00977 junctions[0] = j1; 00978 junctions[1] = j2; 00979 junctions[2] = j3; 00980 junctions[3] = j4; 00981 junctions[4] = j5; 00982 return this->addCell(c, junctions); 00983 }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::addCell | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | j2, | |||
const junction & | j3, | |||
const junction & | j4 | |||
) | [inline] |
Add a new cell with four vertices to the complex.
Definition at line 959 of file complex.h.
00961 { 00962 std::vector<junction> junctions(4, junction(0)); 00963 junctions[0] = j1; 00964 junctions[1] = j2; 00965 junctions[2] = j3; 00966 junctions[3] = j4; 00967 return this->addCell(c, junctions); 00968 }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::addCell | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | j2, | |||
const junction & | j3 | |||
) | [inline] |
Add a new cell with three vertices to the complex.
Definition at line 947 of file complex.h.
Referenced by vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::addCell(), and vvcomplex::VVComplexGraph< RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >), JunctionContent, graph::_EmptyEdgeContent, graph::_EmptyEdgeContent, false >::addCell().
00948 { 00949 std::vector<junction> junctions(3, junction(0)); 00950 junctions[0] = j1; 00951 junctions[1] = j2; 00952 junctions[2] = j3; 00953 return this->addCell(c, junctions); 00954 }
const cell& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::adjacentCell | ( | const cell & | c, | |
const junction & | j | |||
) | const [inline] |
Returns the cell adjacent the c sharing the wall (j, S.nextTo(c,j)).
Definition at line 1177 of file complex.h.
Referenced by vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::adjacentCell(), vvcomplex::VVComplexGraph< RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >), JunctionContent, graph::_EmptyEdgeContent, graph::_EmptyEdgeContent, false >::divideCell(), and vvcomplex::VVComplexGraph< RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >), JunctionContent, graph::_EmptyEdgeContent, graph::_EmptyEdgeContent, false >::splitWall().
01178 { 01179 const junction& nj = this->nextTo(c, j); 01180 const cell& adj = this->prevTo(j, c); 01181 if(this->prevTo(adj, j) == nj) 01182 return adj; 01183 return cell::null; 01184 }
std::pair<cell,cell> vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::adjacentCells | ( | const junction & | j1, | |
const junction & | j2 | |||
) | const [inline] |
Returns the cell(s) sharing the wall (j1,j2).
Definition at line 1192 of file complex.h.
01193 { 01194 vvassert(j1 != j2); 01195 forall(const cell& c , neighbors(j1)) 01196 { 01197 if(nextTo(c, j1) == j2) 01198 { 01199 const cell& c2 = prevTo(j1, c); 01200 if(prevTo(c2, j1) == j2) 01201 return std::make_pair(c,c2); 01202 return std::make_pair(c, cell::null); 01203 } 01204 else if(prevTo(c, j1) == j2) 01205 { 01206 const cell& c1 = nextTo(j1, c); 01207 if(nextTo(c1, j1) == j2) 01208 return std::make_pair(c1, c); 01209 return std::make_pair(cell::null, c); 01210 } 01211 } 01212 return std::make_pair(cell::null, cell::null); 01213 }
const cell& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::any_cell | ( | ) | const [inline] |
Returns a cell from the complex graph.
Definition at line 890 of file complex.h.
00890 { return this->any_vertex1(); }
const junction& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::any_junction | ( | ) | const [inline] |
Retrns a junction from the complex graph.
Definition at line 894 of file complex.h.
00894 { return this->any_vertex2(); }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::border | ( | const cell & | c | ) | const [inline] |
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::border | ( | const junction & | j | ) | const [inline] |
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::border | ( | const cell & | c, | |
const junction & | j | |||
) | const [inline] |
Test if the wall of the cell c starting at j is at the border of the complex graph.
Definition at line 1132 of file complex.h.
Referenced by vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::border(), and vvcomplex::VVComplexGraph< RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >), JunctionContent, graph::_EmptyEdgeContent, graph::_EmptyEdgeContent, false >::border().
std::vector<junction> vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::deleteCell | ( | const cell & | c | ) | [inline] |
Delete a cell and all the junctions that become orphans.
Definition at line 1293 of file complex.h.
01294 { 01295 typename ParentClass::neighbor_iterator1_range p = neighbors(c); 01296 std::vector<junction> js(p.begin(), p.end()); 01297 std::vector<junction> deleted; 01298 erase(c); 01299 forall(const junction& j,js) if(empty(j)) 01300 { 01301 erase(j); 01302 deleted.push_back(j); 01303 } 01304 return deleted; 01305 }
division_result_t vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::divideCell | ( | const cell & | c, | |
const division_data & | ddata | |||
) | [inline] |
Divide a cell.
Definition at line 1405 of file complex.h.
01407 { 01408 //Point3d pu = ddata.pu, pv = ddata.pv; 01409 junction u1 = ddata.u1, v1 = ddata.v1; 01410 junction u2 = this->nextTo(c, u1), v2 = this->nextTo(c, v1); 01411 01412 junction u(0), v(0); 01413 01414 // First, find the neighbor cells 01415 const cell& nu = adjacentCell(c, u1); 01416 const cell& nv = adjacentCell(c, v1); 01417 01418 // Insert a new vertex on the new wall 01419 if(ddata.divide_at_u1) 01420 u = u1; 01421 else 01422 { 01423 u = junction(); 01424 this->insert(u); 01425 this->spliceAfter(c, u1, u); 01426 this->insertEdge(u, c); 01427 } 01428 01429 // Insert a new vertex on the other side 01430 if(ddata.divide_at_v1) 01431 v = v1; 01432 else 01433 { 01434 v = junction(); 01435 this->insert(v); 01436 this->spliceAfter(c, v1, v); 01437 this->insertEdge(v, c); 01438 } 01439 01440 // If necessary, adjust the connectivity of the adjacent cells 01441 // Then compute the position of the new vertices and adjust the one of 01442 // the cells around 01443 if(!ddata.divide_at_u1) 01444 { 01445 if(nu) 01446 { 01447 this->spliceBefore(nu, u1, u); 01448 this->insertEdge(u, nu); 01449 } 01450 } 01451 01452 if(!ddata.divide_at_v1) 01453 { 01454 if(nv) 01455 { 01456 this->spliceBefore(nv, v1, v); 01457 this->insertEdge(v, nv); 01458 } 01459 } 01460 01461 // Create the two new cell centers 01462 cell cl, cr; 01463 this->insert(cl); 01464 this->insert(cr); 01465 01466 // Connect new junctions 01467 this->insertEdge(cl, u); 01468 this->insertEdge(cl, v); 01469 this->insertEdge(cr, u); 01470 this->insertEdge(cr, v); 01471 01472 this->spliceAfter(u, c, cl); 01473 this->replace(u, c, cr); 01474 this->spliceBefore(v, c, cl); 01475 this->replace(v, c, cr); 01476 01477 // Connect the new centers 01478 forall( const junction& x , this->neighbors(c, this->nextTo(c, u))) 01479 { 01480 if(x == v) break; 01481 this->spliceBefore(cr, v, x); 01482 this->replace(x, c, cr); 01483 } 01484 01485 forall( const junction& y , this->neighbors(c, this->nextTo(c, v))) 01486 { 01487 if(y == u) break; 01488 this->spliceBefore(cl, u, y); 01489 this->replace(y, c, cl); 01490 } 01491 01492 // Remove c 01493 this->erase(c); 01494 01495 return division_result_t(cl, cr, u1, u2, u, v1, v2, v); 01496 }
const cell& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::get_cell | ( | size_type | idx | ) | const [inline] |
Returns the cell number idx.
Definition at line 938 of file complex.h.
00938 { return this->get_vertex1(idx); }
const junction& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::get_junction | ( | size_type | idx | ) | const [inline] |
Returns the junction number idx.
Definition at line 942 of file complex.h.
00942 { return this->get_vertex2(idx); }
const junction& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::interfaceWall | ( | const cell & | c1, | |
const cell & | c2 | |||
) | const [inline] |
std::pair<junction, junction> vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::interfaceWallSpan | ( | const cell & | c1, | |
const cell & | c2 | |||
) | const [inline] |
c1
such that the interface between c1
and c2
starts at the first junction and end at the second. In case the c1
is entirely contained in c2
(or the other way around), both junctions will be the same. Definition at line 1272 of file complex.h.
Referenced by vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::interfaceWallSpan(), and vvcomplex::VVComplexGraph< RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >), JunctionContent, graph::_EmptyEdgeContent, graph::_EmptyEdgeContent, false >::mergeCells().
01273 { 01274 forall(const junction& j, neighbors(c1)) 01275 { 01276 if(prevTo(j, c1) == c2) 01277 { 01278 if(nextTo(c1, j) == prevTo(c2, j)) 01279 { 01280 return std::make_pair(startInterfaceWall(j, c1, c2), 01281 endInterfaceWall(j, c1, c2)); 01282 } 01283 } 01284 } 01285 return std::make_pair(junction::null, junction::null); 01286 }
std::pair<junction, junction> vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::mergeCells | ( | const cell & | c1, | |
const cell & | c2, | |||
std::vector< junction > * | deleted_junctions = 0 | |||
) | [inline] |
Merge two adjacent cells.
Only c1 is kept, c2 is being deleted.
Definition at line 1506 of file complex.h.
01507 { 01508 std::pair<junction, junction> result = interfaceWallSpan(c1, c2); 01509 if(!result.first) 01510 return result; 01511 junction j1 = result.first; 01512 junction j2 = result.second; 01513 std::vector<junction> local_deleted_junctions; 01514 if(deleted_junctions == 0) deleted_junctions = &local_deleted_junctions; 01515 forall(const junction& j, neighbors(c1, nextTo(c1, j1))) 01516 { 01517 if(j == j2) 01518 break; 01519 deleted_junctions->push_back(j); 01520 } 01521 01522 // Remove junctions from c1 and W 01523 forall(const junction& j, *deleted_junctions) 01524 { 01525 eraseEdge(c1, j); 01526 } 01527 01528 // Update S 01529 forall(const junction& j, neighbors(c2, nextTo(c2, j1))) 01530 { 01531 if(j == j2) break; 01532 spliceBefore(c1, j2, j); 01533 replace(j, c2, c1); 01534 } 01535 01536 // Erase c2 from C and S 01537 erase(c2); 01538 01539 return result; 01540 }
size_t vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::nb_cells | ( | ) | const [inline] |
Returns the number of cells in the graph.
Definition at line 920 of file complex.h.
00920 { return this->nb_vertices1(); }
size_t vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::nb_junctions | ( | ) | const [inline] |
Returns the number of junctions in the graph.
Definition at line 924 of file complex.h.
00924 { return this->nb_vertices2(); }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::no_cell | ( | ) | const [inline] |
True if there are no cells.
Definition at line 929 of file complex.h.
00929 { return this->no_vertex1(); }
bool vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::no_junction | ( | ) | const [inline] |
True if there are no junctions.
Definition at line 933 of file complex.h.
00933 { return this->no_vertex2(); }
const junction& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::splitWall | ( | const cell & | c, | |
const junction & | j1, | |||
const junction & | x = junction(0) | |||
) | [inline] |
Split a wall in two and return the new junction.
Definition at line 1332 of file complex.h.
01333 { 01334 const cell& c2 = adjacentCell(c, j1); 01335 const junction& j = *insert(x?x:junction()); 01336 spliceAfter(c, j1, j); 01337 insertEdge(j, c); 01338 if(c2) 01339 { 01340 spliceBefore(c2, j1, j); 01341 insertEdge(j, c2); 01342 } 01343 return j; 01344 }
const junction& vvcomplex::VVComplexGraph< CellContent, JunctionContent, CellJunctionContent, JunctionCellContent, compact >::splitWall | ( | const junction & | j1, | |
const junction & | j2, | |||
const junction & | x = junction(0) | |||
) | [inline] |
Split a wall in two and return the new junction.
Definition at line 1310 of file complex.h.
Referenced by vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::splitWall().
01311 { 01312 const junction& j = *insert(x?x:junction()); 01313 forall(const cell& c, neighbors(j1)) 01314 { 01315 if(nextTo(c, j1) == j2) 01316 { 01317 spliceAfter(c, j1, j); 01318 insertEdge(j, c); 01319 } 01320 else if(prevTo(c, j1) == j2) 01321 { 01322 spliceBefore(c, j1, j); 01323 insertEdge(j, c); 01324 } 01325 } 01326 return j; 01327 }