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

Public Member Functions

void bvisit (const Basic &x)
 
void bvisit (const EmptySet &x)
 
void bvisit (const UniversalSet &x)
 
void bvisit (const Complexes &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 Setapply (const Set &s)
 

Private Attributes

RCP< const Setboundary_
 

Detailed Description

Definition at line 182 of file set_funcs.cpp.

Constructor & Destructor Documentation

◆ BoundaryVisitor()

SymEngine::BoundaryVisitor::BoundaryVisitor ( )
inline

Definition at line 188 of file set_funcs.cpp.

188{}

Member Function Documentation

◆ apply()

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

Definition at line 270 of file set_funcs.cpp.

271 {
272 s.accept(*this);
273 return boundary_;
274 };

◆ bvisit() [1/14]

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

Definition at line 190 of file set_funcs.cpp.

190{};

◆ bvisit() [2/14]

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

Definition at line 260 of file set_funcs.cpp.

261 {
262 throw NotImplementedError("inf for Complement not implemented");
263 };

◆ bvisit() [3/14]

void SymEngine::BoundaryVisitor::bvisit ( const Complexes x)
inline

Definition at line 202 of file set_funcs.cpp.

203 {
204 boundary_ = emptyset();
205 };
RCP< const EmptySet > emptyset()
Definition: sets.h:562

◆ bvisit() [4/14]

void SymEngine::BoundaryVisitor::bvisit ( const EmptySet x)
inline

Definition at line 192 of file set_funcs.cpp.

193 {
194 boundary_ = emptyset();
195 };

◆ bvisit() [5/14]

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

Definition at line 237 of file set_funcs.cpp.

238 {
239 boundary_ = rcp_static_cast<const Set>(x.rcp_from_this());
240 };

◆ bvisit() [6/14]

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

Definition at line 265 of file set_funcs.cpp.

266 {
267 throw NotImplementedError("inf for ImageSet not implemented");
268 };

◆ bvisit() [7/14]

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

Definition at line 217 of file set_funcs.cpp.

218 {
219 boundary_ = integers();
220 };
RCP< const Integers > integers()
Definition: sets.h:544

◆ bvisit() [8/14]

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

Definition at line 232 of file set_funcs.cpp.

233 {
234 boundary_ = finiteset({x.get_start(), x.get_end()});
235 };
RCP< const Set > finiteset(const set_basic &container)
Definition: sets.h:574

◆ bvisit() [9/14]

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

Definition at line 222 of file set_funcs.cpp.

223 {
224 boundary_ = naturals();
225 };
RCP< const Naturals > naturals()
Definition: sets.h:550

◆ bvisit() [10/14]

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

Definition at line 227 of file set_funcs.cpp.

228 {
229 boundary_ = naturals0();
230 };
RCP< const Naturals0 > naturals0()
Definition: sets.h:556

◆ bvisit() [11/14]

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

Definition at line 212 of file set_funcs.cpp.

213 {
214 boundary_ = reals();
215 };
RCP< const Reals > reals()
Definition: sets.h:532

◆ bvisit() [12/14]

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

Definition at line 207 of file set_funcs.cpp.

208 {
209 boundary_ = emptyset();
210 };

◆ bvisit() [13/14]

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

Definition at line 242 of file set_funcs.cpp.

243 {
244 set_set boundary_sets;
245 const set_set &sets = x.get_container();
246 for (auto it = sets.begin(); it != sets.end(); ++it) {
247 set_set interior_sets;
248 for (auto interit = sets.begin(); interit != sets.end();
249 ++interit) {
250 if (it != interit) {
251 interior_sets.insert(interior(**interit));
252 }
253 }
254 boundary_sets.insert(
255 set_complement(apply(**it), set_union(interior_sets)));
256 }
257 boundary_ = set_union(boundary_sets);
258 };
T insert(T... args)
T set_union(T... args)

◆ bvisit() [14/14]

void SymEngine::BoundaryVisitor::bvisit ( const UniversalSet x)
inline

Definition at line 197 of file set_funcs.cpp.

198 {
199 boundary_ = emptyset();
200 };

Field Documentation

◆ boundary_

RCP<const Set> SymEngine::BoundaryVisitor::boundary_
private

Definition at line 185 of file set_funcs.cpp.


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