fmatvec  0.0.0
Loading...
Searching...
No Matches
fmatvec::AST::NativeFunction Class Reference

A vertex of the AST representing an arbitary function. More...

#include <ast.h>

Inheritance diagram for fmatvec::AST::NativeFunction:
[legend]

Classes

struct  CacheKeyComp
 

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.
 
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
 
- Public Member Functions inherited from fmatvec::AST::Vertex
virtual bool isConstantInt () const
 Rreturn true if this Vertex is a constant integer.
 
bool isZero () const
 
bool isOne () const
 

Static Public Member Functions

static SymbolicExpression create (const std::shared_ptr< ScalarFunctionWrapArg > &funcWrapper, const std::vector< SymbolicExpression > &argS, const std::vector< SymbolicExpression > &dir1S={}, const std::vector< SymbolicExpression > &dir2S={})
 

Private Types

using CacheKey
 

Private Member Functions

 NativeFunction (const std::shared_ptr< ScalarFunctionWrapArg > &func_, const std::vector< SymbolicExpression > &argS, const std::vector< SymbolicExpression > &dir1S, const std::vector< SymbolicExpression > &dir2S)
 
bool equal (const SymbolicExpression &b, MapIVSE &m) const override
 

Private Attributes

std::shared_ptr< ScalarFunctionWrapArg > funcWrapper
 
const std::vector< SymbolicExpression > argS
 
const std::vector< SymbolicExpression > dir1S
 
const std::vector< SymbolicExpression > dir2S
 

Static Private Attributes

static std::map< CacheKey, std::weak_ptr< const NativeFunction >, CacheKeyComp > cache
 

Additional Inherited Members

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

Detailed Description

A vertex of the AST representing an arbitary function.

Member Typedef Documentation

◆ CacheKey

using fmatvec::AST::NativeFunction::CacheKey
private
Initial value:
std::tuple<std::weak_ptr<ScalarFunctionWrapArg>,
std::vector<std::weak_ptr<const Vertex>>,
std::vector<std::weak_ptr<const Vertex>>,
std::vector<std::weak_ptr<const Vertex>> >

Member Function Documentation

◆ dumpByteCode()

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

Implements fmatvec::AST::Vertex.

◆ equal()

bool fmatvec::AST::NativeFunction::equal ( const SymbolicExpression & b,
MapIVSE & m ) const
overrideprivatevirtual

Implements fmatvec::AST::Vertex.

◆ parDer()

SymbolicExpression fmatvec::AST::NativeFunction::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()

void fmatvec::AST::NativeFunction::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: