Lodestar
An integrated real-time control package in C++
ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight > Class Template Reference

Union of two SetExpressions. More...

#include <SetUnion.hpp>

Inheritance diagram for ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >:
[legend]
Collaboration diagram for ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >:
[legend]

Public Types

using Base = SetExpression< SetUnion< TTypeLeft, TTypeRight > >
 
using ltype = TTypeLeft
 Base class.
 
using rtype = TTypeRight
 Left type.
 
using type = SetUnion< TTypeLeft, TTypeRight >
 Right type.
 
- Public Types inherited from ls::primitives::sets::SetExpression< SetUnion< TTypeLeft, TTypeRight > >
using type = SetUnion< TTypeLeft, TTypeRight >
 

Public Member Functions

 SetUnion (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 TOtherExpr >
SetUnion< type, TOtherExpr > unionize (const SetExpression< TOtherExpr > &expr)
 Creates a union between this expression and another SetExpression. More...
 
template<typename Derived >
double sdf (Eigen::MatrixBase< Derived > &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...
 
- Public Member Functions inherited from ls::primitives::sets::SetExpression< SetUnion< TTypeLeft, TTypeRight > >
 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
 

Protected Attributes

const TTypeLeft & left_
 
const TTypeRight & right_
 Left constant reference.
 
bool empty_
 Right constant reference.
 
- Protected Attributes inherited from ls::primitives::sets::SetExpression< SetUnion< TTypeLeft, TTypeRight > >
SetEnum sEnum_
 

Detailed Description

template<typename TTypeLeft, typename TTypeRight>
class ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >

Union of two SetExpressions.

The syntax is as follows:

// C = A U B
auto C = SetUnion(A, B);
Template Parameters
TTypeLeftType of the left SetExpression.
TTypeRightType of the right SetExpression.

Constructor & Destructor Documentation

◆ SetUnion()

template<typename TTypeLeft , typename TTypeRight >
ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >::SetUnion ( const TTypeLeft &  left,
const TTypeRight &  right,
bool  empty = false 
)
inline

Expression type.

Constructor for the union operation.

The syntax is as follows:

// A U B
SetUnion(A, B);
Parameters
leftThe left operand.
rightThe right operand.
emptyIf true, the expression will be treated as the empty set.

Member Function Documentation

◆ contains()

template<typename TTypeLeft , typename TTypeRight >
template<typename TElementType >
bool ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >::contains ( const TElementType &  el) const
inline

Returns true if this expression contains el.

Template Parameters
TElementTypeType of the element.
Parameters
elElement.
Returns
True if this expression contains el, false otherwise.

◆ getLeft()

template<typename TTypeLeft , typename TTypeRight >
const TTypeLeft& ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >::getLeft ( ) const
inline

Gets the left expression.

Returns
Left expression.

◆ getRight()

template<typename TTypeLeft , typename TTypeRight >
const TTypeRight& ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >::getRight ( ) const
inline

Gets the right expression.

Returns
Right expression.

◆ isEmpty()

template<typename TTypeLeft , typename TTypeRight >
bool ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >::isEmpty ( ) const
inline

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 Derived >
double ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >::sdf ( Eigen::MatrixBase< Derived > &  p) const
inline

Returns signed distance to p.

Template Parameters
DerivedDerived MatrixBase class.
Parameters
pA point.
Returns
Signed distance.

◆ unionize()

template<typename TTypeLeft , typename TTypeRight >
template<typename TOtherExpr >
SetUnion<type, TOtherExpr> ls::primitives::sets::SetUnion< TTypeLeft, TTypeRight >::unionize ( const SetExpression< TOtherExpr > &  expr)
inline

Creates a union between this expression and another SetExpression.

Template Parameters
TExpressionType of the other expression.
Parameters
exprExpression to create a union with.
Returns
Union.

The documentation for this class was generated from the following file:
ls::primitives::sets::SetUnion::SetUnion
SetUnion(const TTypeLeft &left, const TTypeRight &right, bool empty=false)
Expression type.
Definition: SetUnion.hpp:50