fmatvec  0.0.0
Loading...
Searching...
No Matches
fmatvec::AST::Constant< T > Class Template Reference

A vertex of the AST representing a constant (long or double) More...

#include <ast.h>

Inheritance diagram for fmatvec::AST::Constant< T >:
[legend]

Public Member Functions

SymbolicExpression parDer (const IndependentVariable &x) const override
 Generate a new AST being the partial derivate of this AST with respect to the variable x.
 
bool isConstantInt () const override
 Rreturn true if this Vertex is a constant integer.
 
const T & getValue () const
 Get the constant value of the vertex.
 
std::vector< ByteCode >::iterator dumpByteCode (std::vector< ByteCode > &byteCode, std::map< const Vertex *, std::vector< AST::ByteCode >::iterator > &existingVertex) const override
 
void walkVertex (const std::function< void(const std::shared_ptr< const Vertex > &)> &func) const override
 
bool isConstantInt () const
 Rreturn true if this Vertex is a constant integer.
 
bool isConstantInt () const
 Rreturn true if this Vertex is a constant integer.
 
- Public Member Functions inherited from fmatvec::AST::Vertex
bool isZero () const
 
bool isOne () const
 

Static Public Member Functions

static SymbolicExpression create (const T &c_)
 

Private Types

using CacheKey = T
 

Private Member Functions

 Constant (const T &c_)
 
bool equal (const SymbolicExpression &b, MapIVSE &m) const override
 

Private Attributes

friend SymbolicExpression
 
const T c
 

Static Private Attributes

static std::map< CacheKey, std::weak_ptr< const Constant > > cache
 

Additional Inherited Members

- Protected Types inherited from fmatvec::AST::Vertex
using MapIVSE = std::map<IndependentVariable, SymbolicExpression, LessIV>
 

Detailed Description

template<class T>
class fmatvec::AST::Constant< T >

A vertex of the AST representing a constant (long or double)

Member Function Documentation

◆ dumpByteCode()

template<class T >
template std::vector< ByteCode >::iterator fmatvec::AST::Constant< T >::dumpByteCode ( std::vector< ByteCode > & byteCode,
std::map< const Vertex *, std::vector< AST::ByteCode >::iterator > & existingVertex ) const
overridevirtual

Implements fmatvec::AST::Vertex.

◆ equal()

template<class T >
template bool fmatvec::AST::Constant< T >::equal ( const SymbolicExpression & b,
MapIVSE & m ) const
overrideprivatevirtual

Implements fmatvec::AST::Vertex.

◆ isConstantInt() [1/3]

bool fmatvec::AST::Constant< double >::isConstantInt ( ) const
inlinevirtual

Rreturn true if this Vertex is a constant integer.

Reimplemented from fmatvec::AST::Vertex.

◆ isConstantInt() [2/3]

bool fmatvec::AST::Constant< long >::isConstantInt ( ) const
inlinevirtual

Rreturn true if this Vertex is a constant integer.

Reimplemented from fmatvec::AST::Vertex.

◆ isConstantInt() [3/3]

template<class T >
bool fmatvec::AST::Constant< T >::isConstantInt ( ) const
inlineoverridevirtual

Rreturn true if this Vertex is a constant integer.

Reimplemented from fmatvec::AST::Vertex.

◆ parDer()

template<class T >
template SymbolicExpression fmatvec::AST::Constant< T >::parDer ( const IndependentVariable & x) const
overridevirtual

Generate a new AST being the partial derivate of this AST with respect to the variable x.

Implements fmatvec::AST::Vertex.

◆ walkVertex()

template<class T >
template void fmatvec::AST::Constant< T >::walkVertex ( const std::function< void(const std::shared_ptr< const Vertex > &)> & func) const
overridevirtual

Implements fmatvec::AST::Vertex.


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