Represents an hyperoctahedral symmetry.
More...
#include <codac2_OctaSym.h>
|
| | OctaSym (std::initializer_list< int > s) |
| | Constructs an hyperoctahedral symmetry from a list of integers. The list represents the second line in the Cauchy' representation. It is supposed that the first line of the representation is (1 2 3 ... n).
|
| | OctaSym (const std::vector< int > &s) |
| | Constructs an hyperoctahedral symmetry from a vector of integers. The vector represents the second line in the Cauchy' representation. It is supposed that the first line of the representation is (1 2 3 ... n).
|
| OctaSym | invert () const |
| | Inverts of the hyperoctahedral symmetry.
|
| OctaSym | operator* (const OctaSym &s) const |
| | Composes the hyperoctahedral symmetry with another one.
|
| Matrix | permutation_matrix () const |
| | Computes the permutation matrix associated to the hyperoctahedral symmetry.
|
| template<typename Derived> |
| Mat< typename Derived::Scalar,-1, 1 > | operator() (const Eigen::MatrixBase< Derived > &x) const |
| | Applies the hyperoctahedral symmetry to a vector.
|
| template<typename C> |
| CtcAction | operator() (const C &c) const |
| | Applies the hyperoctahedral symmetry to a Contractor.
|
| template<typename S> |
| SepAction | operator() (const S &s) const |
| | Applies the hyperoctahedral symmetry to a Separator.
|
| std::shared_ptr< SetExpr > | operator() (const std::shared_ptr< SetExpr > &x1) const |
| | Applies the hyperoctahedral symmetry to a SetExpr.
|
| template<typename V> |
| VectorExpr | operator() (const V &x1) const |
| | Applies the hyperoctahedral symmetry to a VectorExpr or a VectorVar.
|
Represents an hyperoctahedral symmetry.
◆ OctaSym() [1/2]
| codac2::OctaSym::OctaSym |
( |
std::initializer_list< int > | s | ) |
|
Constructs an hyperoctahedral symmetry from a list of integers. The list represents the second line in the Cauchy' representation. It is supposed that the first line of the representation is (1 2 3 ... n).
- Parameters
-
| s | The list of integers representing the hyperoctahedral symmetry. |
◆ OctaSym() [2/2]
| codac2::OctaSym::OctaSym |
( |
const std::vector< int > & | s | ) |
|
Constructs an hyperoctahedral symmetry from a vector of integers. The vector represents the second line in the Cauchy' representation. It is supposed that the first line of the representation is (1 2 3 ... n).
- Parameters
-
| s | The vector of integers representing the hyperoctahedral symmetry. |
◆ invert()
| OctaSym codac2::OctaSym::invert |
( |
| ) |
const |
Inverts of the hyperoctahedral symmetry.
- Returns
- The inverse of the hyperoctahedral symmetry.
◆ operator*()
Composes the hyperoctahedral symmetry with another one.
- Parameters
-
| s | The hyperoctahedral symmetry to compose with. |
- Returns
- The composition of the two hyperoctahedral symmetries.
◆ permutation_matrix()
| Matrix codac2::OctaSym::permutation_matrix |
( |
| ) |
const |
Computes the permutation matrix associated to the hyperoctahedral symmetry.
- Returns
- The permutation matrix associated to the hyperoctahedral symmetry.
◆ operator()() [1/5]
template<typename Derived>
| Mat< typename Derived::Scalar,-1, 1 > codac2::OctaSym::operator() |
( |
const Eigen::MatrixBase< Derived > & | x | ) |
const |
|
inline |
Applies the hyperoctahedral symmetry to a vector.
- Parameters
-
- Returns
- The result of the application of the hyperoctahedral symmetry to the vector.
89 {
90 assert_release(x.size() == (Index)size());
91 Mat<typename Derived::Scalar,-1,1> x_(x);
92 for(size_t i = 0 ; i < size() ; i++)
93 x_[i] =
sign((*
this)[i])*x[std::abs((*
this)[i])-1];
94 return x_;
95 }
Interval sign(const Interval &x)
Returns .
Definition codac2_Interval_operations_impl.h:279
◆ operator()() [2/5]
template<typename C>
| CtcAction codac2::OctaSym::operator() |
( |
const C & | c | ) |
const |
|
inline |
Applies the hyperoctahedral symmetry to a Contractor.
- Parameters
-
| c | The Contractor to which the hyperoctahedral symmetry is applied. |
- Returns
- The result of the application of the hyperoctahedral symmetry to the Contractor.
42 {
43 return CtcAction(c, *this);
44 }
◆ operator()() [3/5]
template<typename S>
| SepAction codac2::OctaSym::operator() |
( |
const S & | s | ) |
const |
|
inline |
Applies the hyperoctahedral symmetry to a Separator.
- Parameters
-
| s | The Separator to which the hyperoctahedral symmetry is applied. |
- Returns
- The result of the application of the hyperoctahedral symmetry to the Separator.
42 {
43 return SepAction(s, *this);
44 }
◆ operator()() [4/5]
| std::shared_ptr< SetExpr > codac2::OctaSym::operator() |
( |
const std::shared_ptr< SetExpr > & | x1 | ) |
const |
|
inline |
Applies the hyperoctahedral symmetry to a SetExpr.
- Parameters
-
| x1 | The SetExpr to which the hyperoctahedral symmetry is applied. |
- Returns
- The result of the application of the hyperoctahedral symmetry to the SetExpr.
113 {
114 return std::make_shared<SetOperationExpr<ActionSetOp,SetExpr>>(*this,x1);
115 }
◆ operator()() [5/5]
template<typename V>
| VectorExpr codac2::OctaSym::operator() |
( |
const V & | x1 | ) |
const |
|
inline |
Applies the hyperoctahedral symmetry to a VectorExpr or a VectorVar.
- Parameters
-
| x1 | The VectorExpr or VectorVar to which the hyperoctahedral symmetry is applied. |
- Returns
- The result of the application of the hyperoctahedral symmetry to the VectorExpr or VectorVar.
147 {
148 if constexpr(std::is_same_v<V,VectorExpr>)
149 assert_release((Index)this->size() == x1->output_shape().first);
150 else
151 assert_release((Index)this->size() == x1.output_shape().first);
152 return { std::make_shared<AnalyticOperationExpr<OctaSymOp,VectorType,VectorType>>(*this, x1) };
153 }
The documentation for this class was generated from the following files: