|
| AdjacentEdges ()=default |
| Empty constructor.
|
|
uint | adjEdgesNumber () const |
| Returns the number of adjacent edges of this element.
|
|
Edge * | adjEdge (uint i) |
| Returns the pointer to the i-th adjacent edge of the element.
|
|
const Edge * | adjEdge (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.
|
|
Edge * | adjEdgeMod (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 Edge * | adjEdgeMod (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:
|
|
|
template<typename Element > |
void | importFrom (const Element &e, bool importRefs=true) |
|
void | serialize (std::ostream &os) const |
|
void | deserialize (std::istream &is) |
|
uint | size () const |
|
Elem * | element (uint i) |
|
const Elem * | element (uint i) const |
|
uint | elementIndex (uint i) const |
|
Elem * | elementMod (int i) |
|
const Elem * | elementMod (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 |
|
Elem * | elemFromParent (uint vi) |
|
const Elem * | elemFromParent (uint vi) const |
|
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);
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_INDICES | If true, the component will store indices, otherwise pointers to Edge. |
Edge | The type of the adjacent Edge element. |
N | The size of the container, that will represent the number of storable adjacent edges. If negative, the container is dynamic. |
TTVN | If true, the size of the container will be tied to the Vertex Number of the component (this is used mostly on Face elements). |
ParentElemType | This 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. |
VERT | If true, the component will be stored vertically. This argument is considered only if the ElementType is not void. |
OPT | If true, the component will be optional. This argument is considered only if the component is stored vertically. |