Visual Computing Library
Loading...
Searching...
No Matches
vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT > Class Template Reference

The AdjacentEdges class is a container of Edge indices or pointers. It could be used by any Element to save adjacencies information (also the Edge element itself). More...

#include <vclib/mesh/components/adjacent_edges.h>

Inheritance diagram for vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >:

Public Types

using AdjacentEdgeType = Edge
 Expose the type of the Adjacent Edge.
 
using AdjacentEdgeIterator = Base::Iterator
 
using ConstAdjacentEdgeIterator = Base::ConstIterator
 
using ConstAdjacentEdgeIndexIterator = Base::ConstIndexIterator
 

Public Member Functions

 AdjacentEdges ()=default
 Empty constructor.
 
uint adjEdgesNumber () const
 Returns the number of adjacent edges of this element.
 
EdgeadjEdge (uint i)
 Returns the pointer to the i-th adjacent edge of the element.
 
const EdgeadjEdge (uint i) const
 Returns a const pointer to the i-th adjacent edge of the element.
 
uint adjEdgeIndex (uint i) const
 Returns the index in the edge container of the i-th adjacent edge of the element.
 
EdgeadjEdgeMod (int i)
 Returns the pointer to the i-th adjacent edge of the element but using as index the module between i and the number of adjacent edges. You can use this function if you need to get the "next adjacent edge after position k", without check if it is less than the number of adj edges. Works also for negative numbers:
 
const EdgeadjEdgeMod (int i) const
 Same of adjEdgeMod, but returns a const Pointer to the adjacent edge.
 
uint adjEdgeIndexMod (int i) const
 Returns the index in the edge container of the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to get the "index of the adjacent edge next to position k", without check if it is less than the number of adjacent edges. Works also for negative numbers:
 
void setAdjEdge (uint i, Edge *e)
 Sets the i-th adjacent edge of the element.
 
void setAdjEdge (uint i, uint ei)
 Sets the i-th adjacent edge of the element.
 
void setAdjEdge (ConstAdjacentEdgeIterator it, Edge *e)
 Sets the adjacent edge pointed by the iterator.
 
void setAdjEdge (ConstAdjacentEdgeIterator it, uint ei)
 Sets the adjacent edge pointed by the iterator.
 
void setAdjEdge (ConstAdjacentEdgeIndexIterator it, Edge *e)
 Sets the adjacent edge pointed by the iterator.
 
void setAdjEdge (ConstAdjacentEdgeIndexIterator it, uint ei)
 Sets the adjacent edge pointed by the iterator.
 
void setAdjEdgeMod (int i, Edge *e)
 Sets the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to set the "next adjacent edge after position k", without check if it is less than the number of adjacent edges. Works also for negative numbers:
 
void setAdjEdgeMod (int i, uint ei)
 Sets the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to set the "next adjacent edge after position k", without check if it is less than the number of adjacent edges. Works also for negative numbers:
 
template<Range Rng>
requires InputRange<Rng, Edge*>
void setAdjEdges (Rng &&r)
 Sets all the adjacent edges of the element.
 
template<Range Rng>
requires InputRange<Rng, uint>
void setAdjEdges (Rng &&r)
 Sets all the adjacent edges of the element.
 
bool containsAdjEdge (const Edge *e) const
 Returns true if the container of adjacent edges contains the given edge, false otherwise.
 
bool containsAdjEdge (uint ei) const
 Returns true if the container of adjacent edges contains the given index, false otherwise.
 
uint indexOfAdjEdge (const Edge *e) const
 Returns the index of the given adjacent edge in the container of the element. If the given adjacent edge is not in the container, returns UINT_NULL.
 
uint indexOfAdjEdge (uint ei) const
 Returns the index of the adjacent edge with the given index in the container of the element. If the adjacent edge with the given index is not in the container, returns UINT_NULL.
 
void resizeAdjEdges (uint n)
 Resize the container of the adjacent edges to the given size.
 
void pushAdjEdge (Edge *e)
 Pushes in the back of the container the given adjacent edge.
 
void pushAdjEdge (uint ei)
 Pushes in the back of the container the given adjacent edge.
 
void insertAdjEdge (uint i, Edge *e)
 Inserts the given adjacent edge in the container at the given position.
 
void insertAdjEdge (uint i, uint ei)
 Inserts the adjacent edge with the given index in the container at the given position.
 
void eraseAdjEdge (uint i)
 Removes the adjacent edge at the given position from the container.
 
void clearAdjEdges ()
 Clears the container of adjacent edges, making it empty.
 
AdjacentEdgeIterator adjEdgeBegin ()
 Returns an iterator to the first adjacent edge in the container of this component.
 
AdjacentEdgeIterator adjEdgeEnd ()
 Returns an iterator to the end of the container of this component.
 
ConstAdjacentEdgeIterator adjEdgeBegin () const
 Returns a const iterator to the first adjacent edge in the container of this component.
 
ConstAdjacentEdgeIterator adjEdgeEnd () const
 Returns a const iterator to the end of the container of this component.
 
ConstAdjacentEdgeIndexIterator adjEdgeIndexBegin () const
 Returns an iterator to the first adjacent edge index in the container of this component.
 
ConstAdjacentEdgeIndexIterator adjEdgeIndexEnd () const
 Returns an iterator to the end of the container of this component.
 
View< AdjacentEdgeIterator > adjEdges ()
 Returns a lightweight view object that stores the begin and end iterators of the container of adjacent edges of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:
 
View< ConstAdjacentEdgeIterator > adjEdges () const
 Returns a lightweight const view object that stores the begin and end iterators of the container of adjacent edges of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:
 
View< ConstAdjacentEdgeIndexIterator > adjEdgeIndices () const
 Returns a lightweight view object that stores the begin and end iterators of the container of adjacent edge indices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:
 

Static Public Attributes

static const int ADJ_EDGE_NUMBER = Base::SIZE
 Static size of the container. If the container is dynamic, this value will be negative and you should use the adjEdgesNumber() member function.
 

Protected Member Functions

template<typename Element >
void importFrom (const Element &e, bool importRefs=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::ReferenceContainerComponent< STORE_INDICES, DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN >
uint size () const
 
Elemelement (uint i)
 
const Elemelement (uint i) const
 
uint elementIndex (uint i) const
 
ElemelementMod (int i)
 
const ElemelementMod (int i) const
 
uint elementIndexMod (int i) const
 
void setElement (uint i, Elem *e)
 
void setElement (uint i, uint ei)
 
void setElement (Base::ConstIterator it, Elem *v)
 
void setElement (Base::ConstIterator it, uint vi)
 
void setElement (Base::ConstIndexIterator it, Elem *v)
 
void setElement (Base::ConstIndexIterator it, uint vi)
 
void setElementMod (int i, Elem *e)
 
void setElementMod (int i, uint ei)
 
template<Range Rng>
requires InputRange<Rng, Elem*>
void setElements (Rng &&r)
 
template<Range Rng>
requires InputRange<Rng, uint>
void setElements (Rng &&r)
 
bool containsElement (const Elem *e) const
 
bool containsElement (uint ei) const
 
uint indexOfElement (const Elem *e) const
 
uint indexOfElement (uint ei) const
 
Base::Iterator elementBegin ()
 
Base::Iterator elementEnd ()
 
Base::ConstIterator elementBegin () const
 
Base::ConstIterator elementEnd () const
 
Base::ConstIndexIterator elementIndexBegin () const
 
Base::ConstIndexIterator elementIndexEnd () const
 
View< typename Base::Iterator > elements ()
 
View< typename Base::ConstIterator > elements () const
 
View< typename Base::ConstIndexIterator > elementIndices () const
 
void resize (uint n)
 
void pushBack (Elem *e=nullptr)
 
void pushBack (uint ei)
 
void insert (uint i, Elem *e=nullptr)
 
void insert (uint i, uint ei)
 
void erase (uint i)
 
void clear ()
 
uint indexFromPointer (const Elem *v) const
 
ElemelemFromParent (uint vi)
 
const ElemelemFromParent (uint vi) const
 

Private Types

using Base = ReferenceContainerComponent< STORE_INDICES, AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >, CompId::ADJACENT_EDGES, Edge, N, ParentElemType, VERT, OPT, TTVN >
 

Private Member Functions

template<typename Element >
void importIndicesFrom (const Element &e)
 

Additional Inherited Members

- Protected Types inherited from vcl::comp::ReferenceContainerComponent< STORE_INDICES, DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN >
using Base = std::conditional_t< STORE_INDICES, IndexContainerComponent< DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN >, PointerContainerComponent< DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN > >
 

Detailed Description

template<bool STORE_INDICES, typename Edge, int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
class vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >

The AdjacentEdges class is a container of Edge indices or pointers. It could be used by any Element to save adjacencies information (also the Edge element itself).

It is a random access container having static or dynamic size, depending on the value of the template argument N (a negative number means dynamic).

The member functions of this class will be available in the instance of any Element that will contain this component.

For example, if you have a Vertex Element v that has the AdjacentEdges component, you'll be able to access to this component member functions from v:

v.adjEdgesNumber();
auto* e = v.adjEdge(0);
uint ei = v.adjEdgeIndex(0);
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Note
This component could be Tied To Vertex Number: it means that the size of the container, if dynamic, will change automatically along the Vertex Number of the Component. Check the TTVN template value on the specialization of your component to check if it is tied to the Vertex Number. For further details check the documentation of the ContainerComponent class.
Template Parameters
STORE_INDICESIf true, the component will store indices, otherwise pointers to Edge.
EdgeThe type of the adjacent Edge element.
NThe size of the container, that will represent the number of storable adjacent edges. If negative, the container is dynamic.
TTVNIf true, the size of the container will be tied to the Vertex Number of the component (this is used mostly on Face elements).
ParentElemTypeThis type is used to get access to the Element that has the component (and, in case, to the Mesh that has the Element). If the component doesn't need to access the Element, this type can be void. Note: if the component is vertical (or optional), this type cannot be void.
VERTIf true, the component will be stored vertically. This argument is considered only if the ElementType is not void.
OPTIf true, the component will be optional. This argument is considered only if the component is stored vertically.

Constructor & Destructor Documentation

◆ AdjacentEdges()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::AdjacentEdges ( )
default

Empty constructor.

If the Adjacent Edges container size is static, initializes all the Adjacent Edges to nullptr, otherwise the container will be empty.

Member Function Documentation

◆ adjEdge() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
Edge * vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdge ( uint  i)
inline

Returns the pointer to the i-th adjacent edge of the element.

Parameters
[in]ithe position of the required adjacent edge in this container; the value must be between 0 and the number of adj edges.
Returns
The pointer to the i-th adjacent edge of the element.

◆ adjEdge() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
const Edge * vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdge ( uint  i) const
inline

Returns a const pointer to the i-th adjacent edge of the element.

Parameters
[in]ithe position of the required adjacent edge in this container; the value must be between 0 and the number of adj edges.
Returns
The pointer to the i-th adjacent edge of the element.

◆ adjEdgeBegin() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
AdjacentEdgeIterator vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeBegin ( )
inline

Returns an iterator to the first adjacent edge in the container of this component.

Returns
an iterator pointing to the begin of this container.

◆ adjEdgeBegin() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentEdgeIterator vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeBegin ( ) const
inline

Returns a const iterator to the first adjacent edge in the container of this component.

Returns
an iterator pointing to the begin of this container.

◆ adjEdgeEnd() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
AdjacentEdgeIterator vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeEnd ( )
inline

Returns an iterator to the end of the container of this component.

Returns
an iterator pointing to the end of this container.

◆ adjEdgeEnd() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentEdgeIterator vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeEnd ( ) const
inline

Returns a const iterator to the end of the container of this component.

Returns
an iterator pointing to the end of this container.

◆ adjEdgeIndex()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeIndex ( uint  i) const
inline

Returns the index in the edge container of the i-th adjacent edge of the element.

Parameters
[in]ithe position of the required edge in this container.
Returns
The index of the i-th adjacent edge of the element.

◆ adjEdgeIndexBegin()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentEdgeIndexIterator vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeIndexBegin ( ) const
inline

Returns an iterator to the first adjacent edge index in the container of this component.

Returns
an iterator pointing to the begin of the adjacent edge indices.

◆ adjEdgeIndexEnd()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentEdgeIndexIterator vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeIndexEnd ( ) const
inline

Returns an iterator to the end of the container of this component.

Returns
an iterator pointing to the end of the adjacent edge indices.

◆ adjEdgeIndexMod()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeIndexMod ( int  i) const
inline

Returns the index in the edge container of the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to get the "index of the adjacent edge next to position k", without check if it is less than the number of adjacent edges. Works also for negative numbers:

k = pos; // some position of an adjacent edge
auto idx = e.adjEdgeIndexMod(k+1); // the index of the adjacent edge next
// to k, that may also be at pos 0
auto lastIdx = e.adjEdgeIndexMod(-1); // the index of the adjacent edge
// in position adjEdgesNumber()-1
Parameters
[in]ithe position of the required adjacent edge in this container, w.r.t. the position 0; value is modularized on adjEdgesNumber().
Returns
The index of the required adjacent edge of the element.

◆ adjEdgeIndices()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
View< ConstAdjacentEdgeIndexIterator > vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeIndices ( ) const
inline

Returns a lightweight view object that stores the begin and end iterators of the container of adjacent edge indices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:

// Do something with adj edge index...
}
View< ConstAdjacentEdgeIndexIterator > adjEdgeIndices() const
Returns a lightweight view object that stores the begin and end iterators of the container of adjacen...
Definition adjacent_edges.h:602
Returns
a lightweight view object that can be used in range-based for loops to iterate over adjacent edge indices.

◆ adjEdgeMod() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
Edge * vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeMod ( int  i)
inline

Returns the pointer to the i-th adjacent edge of the element but using as index the module between i and the number of adjacent edges. You can use this function if you need to get the "next adjacent edge after position k", without check if it is less than the number of adj edges. Works also for negative numbers:

k = pos; // some position of an adjacent edge
auto* next = e.adjEdgeMod(k+1); // the adj edge next to k, that may also
// be at pos 0
auto* last = e.adjEdgeMod(-1); // the adj edge in position
// adjEdgeNumber()-1
Parameters
[in]ithe position of the required adjacent edge in this container, w.r.t. the position 0; value is modularized on adjEdgeNumber().
Returns
The pointer to the required adjacent edge of the element.

◆ adjEdgeMod() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
const Edge * vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgeMod ( int  i) const
inline

Same of adjEdgeMod, but returns a const Pointer to the adjacent edge.

Parameters
[in]ithe position of the required adjacent edge in this container, w.r.t. the position 0; value is modularized on adjEdgeNumber().
Returns
The pointer to the required adjacent edge of this element.

◆ adjEdges() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
View< AdjacentEdgeIterator > vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdges ( )
inline

Returns a lightweight view object that stores the begin and end iterators of the container of adjacent edges of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:

for (auto* adjEdge : el.adjEdges()) {
// Do something with adjEdge
}
View< AdjacentEdgeIterator > adjEdges()
Returns a lightweight view object that stores the begin and end iterators of the container of adjacen...
Definition adjacent_edges.h:563
Edge * adjEdge(uint i)
Returns the pointer to the i-th adjacent edge of the element.
Definition adjacent_edges.h:161
Returns
a lightweight view object that can be used in range-based for loops to iterate over adjacent edges.

◆ adjEdges() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
View< ConstAdjacentEdgeIterator > vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdges ( ) const
inline

Returns a lightweight const view object that stores the begin and end iterators of the container of adjacent edges of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:

for (const auto* adjEdge : el.adjEdges()) {
// Do something read-only with adjEdge
}
Returns
a lightweight view object that can be used in range-based for loops to iterate over adjacent edges.

◆ adjEdgesNumber()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::adjEdgesNumber ( ) const
inline

Returns the number of adjacent edges of this element.

Returns
The number of adjacent edges of this element.

◆ clearAdjEdges()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::clearAdjEdges ( )
inline

Clears the container of adjacent edges, making it empty.

Note
This function is available only if the container of the Adjacent Edges component has dynamic size.

◆ containsAdjEdge() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
bool vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::containsAdjEdge ( const Edge e) const
inline

Returns true if the container of adjacent edges contains the given edge, false otherwise.

Parameters
[in]ethe pointer to the edge to search.
Returns
true if the container of adjacent edges contains the given edge, false otherwise.

◆ containsAdjEdge() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
bool vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::containsAdjEdge ( uint  ei) const
inline

Returns true if the container of adjacent edges contains the given index, false otherwise.

Parameters
[in]eithe index to the edge to search.
Returns
true if the container of adjacent edges contains the given index, false otherwise.

◆ eraseAdjEdge()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::eraseAdjEdge ( uint  i)
inline

Removes the adjacent edge at the given position from the container.

Note
This function is available only if the container of the Adjacent Edges component has dynamic size.
Parameters
[in]iThe position of the adjacent edge to remove from this container.

◆ indexOfAdjEdge() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::indexOfAdjEdge ( const Edge e) const
inline

Returns the index of the given adjacent edge in the container of the element. If the given adjacent edge is not in the container, returns UINT_NULL.

Parameters
[in]ethe pointer to the adjacent edge to search.
Returns
the index of the given adjacent edge, or UINT_NULL if it is not found.

◆ indexOfAdjEdge() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::indexOfAdjEdge ( uint  ei) const
inline

Returns the index of the adjacent edge with the given index in the container of the element. If the adjacent edge with the given index is not in the container, returns UINT_NULL.

Parameters
[in]eithe index to the adjacent edge to search.
Returns
the index of the adjacent edge with the given index, or UINT_NULL if it is not found.

◆ insertAdjEdge() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::insertAdjEdge ( uint  i,
Edge e 
)
inline

Inserts the given adjacent edge in the container at the given position.

Note
This function is available only if the container of the Adjacent Edges component has dynamic size.
Parameters
[in]iThe position in this container where to insert the adjacent edge.
[in]eThe pointer to the adjacent edge to insert in the container.

◆ insertAdjEdge() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::insertAdjEdge ( uint  i,
uint  ei 
)
inline

Inserts the adjacent edge with the given index in the container at the given position.

Note
This function is available only if the container of the Adjacent Edges component has dynamic size.
Parameters
[in]iThe position in this container where to insert the adjacent edge.
[in]eiThe index to the adjacent edge to insert in the container.

◆ pushAdjEdge() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::pushAdjEdge ( Edge e)
inline

Pushes in the back of the container the given adjacent edge.

Note
This function is available only if the container of the Adjacent Edges component has dynamic size.
Parameters
[in]eThe pointer to the adjacent edge to push in the back of the container.

◆ pushAdjEdge() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::pushAdjEdge ( uint  ei)
inline

Pushes in the back of the container the given adjacent edge.

Note
This function is available only if the container of the Adjacent Edges component has dynamic size.
Parameters
[in]eiThe index to the adjacent edge to push in the back of the container.

◆ resizeAdjEdges()

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::resizeAdjEdges ( uint  n)
inline

Resize the container of the adjacent edges to the given size.

Note
This function is available only if the container of the Adjacent Edges component has dynamic size.
Parameters
[in]nThe new size of the adjacent edges container.

◆ setAdjEdge() [1/6]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdge ( ConstAdjacentEdgeIndexIterator  it,
Edge e 
)
inline

Sets the adjacent edge pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent edge; the value must be between begin() and end().
[in]eThe pointer to the adjacent edge to set to the element.

◆ setAdjEdge() [2/6]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdge ( ConstAdjacentEdgeIndexIterator  it,
uint  ei 
)
inline

Sets the adjacent edge pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent edge; the value must be between begin() and end().
[in]eiThe index in the edge container of the edge to set.

◆ setAdjEdge() [3/6]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdge ( ConstAdjacentEdgeIterator  it,
Edge e 
)
inline

Sets the adjacent edge pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent edge; the value must be between begin() and end().
[in]eThe pointer to the adjacent edge to set to the element.

◆ setAdjEdge() [4/6]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdge ( ConstAdjacentEdgeIterator  it,
uint  ei 
)
inline

Sets the adjacent edge pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent edge; the value must be between begin() and end().
[in]eiThe index in the edge container of the edge to set.

◆ setAdjEdge() [5/6]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdge ( uint  i,
Edge e 
)
inline

Sets the i-th adjacent edge of the element.

Parameters
[in]ithe position in this container on which set the adj edge; the value must be between 0 and the number of adj edges.
[in]eThe pointer to the adjacent edge to set to the element.

◆ setAdjEdge() [6/6]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdge ( uint  i,
uint  ei 
)
inline

Sets the i-th adjacent edge of the element.

Parameters
[in]ithe position in this container on which set the adj edge; the value must be between 0 and the number of adj edges.
[in]eiThe index in the edge container of the edge to set.

◆ setAdjEdgeMod() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdgeMod ( int  i,
Edge e 
)
inline

Sets the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to set the "next adjacent edge after position k", without check if it is less than the number of adjacent edges. Works also for negative numbers:

k = pos; // some position of an adj edge
e.setAdjEdgeMod(k+1, aEdge); // set the adj edge next to k, that may also
// be at pos 0
e.setAdjEdgeMod(-1, aEdge); // set the adj edge in position
// adjEdgesNumber()-1
Parameters
[in]ithe position in this container w.r.t. the position 0 on which set the adj edge; value is modularized on adjEdgesNumber().
[in]eThe pointer to the adj edge to set to the element.

◆ setAdjEdgeMod() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdgeMod ( int  i,
uint  ei 
)
inline

Sets the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to set the "next adjacent edge after position k", without check if it is less than the number of adjacent edges. Works also for negative numbers:

k = pos; // some position of an adj edge
e.setAdjEdgeMod(k+1, aEdgeInd); // set the adj edge next to k, that may
// also be at pos 0
e.setAdjEdgeMod(-1, aEdgeInd); // set the adj edge in position
// adjEdgesNumber()-1
Parameters
[in]ithe position in this container w.r.t. the position 0 on which set the adj edge; value is modularized on adjEdgesNumber().
[in]eiThe index in the edge container of the edge to set.

◆ setAdjEdges() [1/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
template<Range Rng>
requires InputRange<Rng, Edge*>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdges ( Rng &&  r)
inline

Sets all the adjacent edges of the element.

If the size of the container is static, the size of the input range must be the same one of the container.

Template Parameters
RngThe type of the range of adjacent edges to set. The value type of the range must be convertible to a pointer to an AdjacentEdge.
Parameters
[in]rrange of edge pointers to set.

◆ setAdjEdges() [2/2]

template<bool STORE_INDICES, typename Edge , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
template<Range Rng>
requires InputRange<Rng, uint>
void vcl::comp::AdjacentEdges< STORE_INDICES, Edge, N, TTVN, ParentElemType, VERT, OPT >::setAdjEdges ( Rng &&  r)
inline

Sets all the adjacent edges of the element.

If the size of the container is static, the size of the input range must be the same one of the container.

Template Parameters
RngThe type of the range of adjacent edges to set. The value type of the range must be convertible to an unsigned integer.
Parameters
[in]rrange of edges indices to set.

The documentation for this class was generated from the following file: