Loading...
Searching...
No Matches
SymEngine::InfVisitor Class Reference
+ Inheritance diagram for SymEngine::InfVisitor:
+ Collaboration diagram for SymEngine::InfVisitor:

Public Member Functions

void bvisit (const Basic &x)
 
void bvisit (const Set &x)
 
void bvisit (const Reals &x)
 
void bvisit (const Rationals &x)
 
void bvisit (const Integers &x)
 
void bvisit (const Naturals &x)
 
void bvisit (const Naturals0 &x)
 
void bvisit (const Interval &x)
 
void bvisit (const FiniteSet &x)
 
void bvisit (const Union &x)
 
void bvisit (const Complement &x)
 
void bvisit (const ImageSet &x)
 
RCP< const Basicapply (const Set &s)
 

Private Attributes

RCP< const Basicinf_
 

Detailed Description

Definition at line 90 of file set_funcs.cpp.

Constructor & Destructor Documentation

◆ InfVisitor()

SymEngine::InfVisitor::InfVisitor ( )
inline

Definition at line 96 of file set_funcs.cpp.

96{}

Member Function Documentation

◆ apply()

RCP< const Basic > SymEngine::InfVisitor::apply ( const Set s)
inline

Definition at line 163 of file set_funcs.cpp.

164 {
165 s.accept(*this);
166 return inf_;
167 };

◆ bvisit() [1/12]

void SymEngine::InfVisitor::bvisit ( const Basic x)
inline

Definition at line 98 of file set_funcs.cpp.

98{};

◆ bvisit() [2/12]

void SymEngine::InfVisitor::bvisit ( const Complement x)
inline

Definition at line 153 of file set_funcs.cpp.

154 {
155 throw NotImplementedError("inf for Complement not implemented");
156 };

◆ bvisit() [3/12]

void SymEngine::InfVisitor::bvisit ( const FiniteSet x)
inline

Definition at line 136 of file set_funcs.cpp.

137 {
138 const set_basic &container = x.get_container();
139 vec_basic v(container.begin(), container.end());
140 inf_ = min(v);
141 };
RCP< const Basic > min(const vec_basic &arg)
Canonicalize Min:
Definition: functions.cpp:3659

◆ bvisit() [4/12]

void SymEngine::InfVisitor::bvisit ( const ImageSet x)
inline

Definition at line 158 of file set_funcs.cpp.

159 {
160 throw NotImplementedError("inf for ImageSet not implemented");
161 };

◆ bvisit() [5/12]

void SymEngine::InfVisitor::bvisit ( const Integers x)
inline

Definition at line 116 of file set_funcs.cpp.

117 {
118 inf_ = infty(-1);
119 };

◆ bvisit() [6/12]

void SymEngine::InfVisitor::bvisit ( const Interval x)
inline

Definition at line 131 of file set_funcs.cpp.

132 {
133 inf_ = x.get_start();
134 };

◆ bvisit() [7/12]

void SymEngine::InfVisitor::bvisit ( const Naturals x)
inline

Definition at line 121 of file set_funcs.cpp.

122 {
123 inf_ = integer(1);
124 };
std::enable_if< std::is_integral< T >::value, RCP< constInteger > >::type integer(T i)
Definition: integer.h:200

◆ bvisit() [8/12]

void SymEngine::InfVisitor::bvisit ( const Naturals0 x)
inline

Definition at line 126 of file set_funcs.cpp.

127 {
128 inf_ = integer(0);
129 };

◆ bvisit() [9/12]

void SymEngine::InfVisitor::bvisit ( const Rationals x)
inline

Definition at line 111 of file set_funcs.cpp.

112 {
113 inf_ = infty(-1);
114 };

◆ bvisit() [10/12]

void SymEngine::InfVisitor::bvisit ( const Reals x)
inline

Definition at line 106 of file set_funcs.cpp.

107 {
108 inf_ = infty(-1);
109 };

◆ bvisit() [11/12]

void SymEngine::InfVisitor::bvisit ( const Set x)
inline

Definition at line 100 of file set_funcs.cpp.

101 {
102 throw SymEngineException(
103 "Set not partially ordered: infimum undefined");
104 };

◆ bvisit() [12/12]

void SymEngine::InfVisitor::bvisit ( const Union x)
inline

Definition at line 143 of file set_funcs.cpp.

144 {
145 vec_basic infima;
146 for (auto &a : x.get_container()) {
147 a->accept(*this);
148 infima.push_back(inf_);
149 }
150 inf_ = min(infima);
151 };
T push_back(T... args)

Field Documentation

◆ inf_

RCP<const Basic> SymEngine::InfVisitor::inf_
private

Definition at line 93 of file set_funcs.cpp.


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