Relative complement of two SetExpressions.
More...
#include <SetComplement.hpp>
|
| SetComplement (const TTypeLeft &left, const TTypeRight &right, bool empty=false) |
| Expression type. More...
|
|
bool | isEmpty () const |
| Returns true if the expression is the empty set. More...
|
|
template<typename TElementType > |
bool | contains (const TElementType &el) const |
| Returns true if this expression contains el . More...
|
|
template<typename TExpression > |
SetUnion< type, TExpression > | unionize (const SetExpression< TExpression > &expr) |
| Creates a union between this expression and another SetExpression. More...
|
|
template<typename TDerived > |
double | sdf (Eigen::MatrixBase< TDerived > &p) const |
| Returns signed distance to p . More...
|
|
const TTypeLeft & | getLeft () const |
| Gets the left expression. More...
|
|
const TTypeRight & | getRight () const |
| Gets the right expression. More...
|
|
| SetExpression (const SetEnum setEnum) |
|
bool | operator== (const TElementType &el) const |
|
bool | operator!= (const TElementType &el) const |
|
bool | contains (const TElementType &el) const |
|
bool | isSubset (const TElementType &el) const |
|
bool | isSuperset (const TElementType &el) const |
|
bool | isEmpty () const |
|
SetExpression< TReturnType > | relComplement (const TElementType &el) const |
|
SetExpression< TReturnType > | unionize (const TOtherExpr &expr) |
|
double | sdf (Eigen::MatrixBase< Derived > &p) const |
|
SetEnum | getEnum () const |
|
|
const TTypeLeft & | left_ |
|
const TTypeRight & | right_ |
| Left constant reference.
|
|
bool | empty_ |
| Right constant reference.
|
|
SetEnum | sEnum_ |
|
template<typename TTypeLeft, typename TTypeRight>
class ls::primitives::sets::SetComplement< TTypeLeft, TTypeRight >
Relative complement of two SetExpressions.
The syntax is as follows:
- Template Parameters
-
◆ SetComplement()
template<typename TTypeLeft , typename TTypeRight >
Expression type.
Constructor for the relative complement operation.
The syntax is as follows:
- Parameters
-
left | The left operand. |
right | The right operand. |
empty | If true, the expression will be treated as the empty set. |
◆ contains()
template<typename TTypeLeft , typename TTypeRight >
template<typename TElementType >
Returns true if this expression contains el
.
- Template Parameters
-
TElementType | Type of the element. |
- Parameters
-
- Returns
- True if this expression contains
el
, false otherwise.
◆ getLeft()
template<typename TTypeLeft , typename TTypeRight >
Gets the left expression.
- Returns
- Left expression.
◆ getRight()
template<typename TTypeLeft , typename TTypeRight >
Gets the right expression.
- Returns
- Right expression.
◆ isEmpty()
template<typename TTypeLeft , typename TTypeRight >
Returns true if the expression is the empty set.
- Returns
- True if expression is the empty set.
◆ sdf()
template<typename TTypeLeft , typename TTypeRight >
template<typename TDerived >
Returns signed distance to p
.
The signed distance for the complement is computed as follows:
A \ B = A \cap B\compl = (A\compl \cup B)\compl,
which follows by an application of De Morgan's laws. This yields
A.relComplement(B).sdf(p) = - min(-A.sdf(p), B.sdf(p));
- Template Parameters
-
TDerived | Derived MatrixBase class. |
- Parameters
-
- Returns
- Signed distance.
◆ unionize()
template<typename TTypeLeft , typename TTypeRight >
template<typename TExpression >
Creates a union between this expression and another SetExpression.
- Template Parameters
-
TExpression | Type of the other expression. |
- Parameters
-
expr | Expression to create a union with. |
- Returns
- Union.
The documentation for this class was generated from the following file: