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

Public Member Functions

 IsALinearArgTrigVisitor (Ptr< const Symbol > x)
 
bool apply (const Basic &b)
 
bool apply (const RCP< const Basic > &b)
 
void bvisit (const Basic &x)
 
void bvisit (const Symbol &x)
 
template<typename T , typename = enable_if_t<std::is_base_of<TrigFunction, T>::value or std::is_base_of<HyperbolicFunction, T>::value>>
void bvisit (const T &x)
 

Protected Attributes

Ptr< const Symbolx_
 
bool is_
 

Additional Inherited Members

- Data Fields inherited from SymEngine::LocalStopVisitor
bool local_stop_
 
- Data Fields inherited from SymEngine::StopVisitor
bool stop_
 

Detailed Description

Definition at line 300 of file solve.cpp.

Constructor & Destructor Documentation

◆ IsALinearArgTrigVisitor()

SymEngine::IsALinearArgTrigVisitor::IsALinearArgTrigVisitor ( Ptr< const Symbol x)
inline

Definition at line 308 of file solve.cpp.

308: x_(x) {}

Member Function Documentation

◆ apply() [1/2]

bool SymEngine::IsALinearArgTrigVisitor::apply ( const Basic b)
inline

Definition at line 310 of file solve.cpp.

311 {
312 stop_ = false;
313 is_ = true;
314 preorder_traversal_local_stop(b, *this);
315 return is_;
316 }

◆ apply() [2/2]

bool SymEngine::IsALinearArgTrigVisitor::apply ( const RCP< const Basic > &  b)
inline

Definition at line 318 of file solve.cpp.

319 {
320 return apply(*b);
321 }

◆ bvisit() [1/3]

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

Definition at line 323 of file solve.cpp.

324 {
325 local_stop_ = false;
326 }

◆ bvisit() [2/3]

void SymEngine::IsALinearArgTrigVisitor::bvisit ( const Symbol x)
inline

Definition at line 328 of file solve.cpp.

329 {
330 if (x_->__eq__(x)) {
331 is_ = 0;
332 stop_ = true;
333 }
334 }

◆ bvisit() [3/3]

template<typename T , typename = enable_if_t<std::is_base_of<TrigFunction, T>::value or std::is_base_of<HyperbolicFunction, T>::value>>
void SymEngine::IsALinearArgTrigVisitor::bvisit ( const T &  x)
inline

Definition at line 340 of file solve.cpp.

341 {
342 is_ = (from_basic<UExprPoly>(x.get_args()[0], (*x_).rcp_from_this())
343 ->get_degree()
344 <= 1);
345 if (not is_)
346 stop_ = true;
347 local_stop_ = true;
348 }

Field Documentation

◆ is_

bool SymEngine::IsALinearArgTrigVisitor::is_
protected

Definition at line 305 of file solve.cpp.

◆ x_

Ptr<const Symbol> SymEngine::IsALinearArgTrigVisitor::x_
protected

Definition at line 304 of file solve.cpp.


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