Cadabra
Computer algebra system for field theory problems
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cadabra::str_node Class Reference

Description

Elementary building block for a mathematical expression.

Contains information about the way in which the node is related to the parent node, and iterators into the global list of names and rationals.

#include <Storage.hh>

Classes

struct  flag_t
 

Public Types

enum  bracket_t {
  b_round =0 , b_square =1 , b_curly =2 , b_pointy =3 ,
  b_none =4 , b_no =5 , b_invalid =6
}
 
enum  parent_rel_t {
  p_sub =0 , p_super =1 , p_none =2 , p_property =3 ,
  p_exponent =4 , p_components =5 , p_invalid =7
}
 Child nodes are related to their parent node by a so-called parent relation, which can be one of these values. More...
 

Public Member Functions

 str_node (void)
 
 str_node (nset_t::iterator name, bracket_t btype=b_none, parent_rel_t ptype=p_none)
 
 str_node (const std::string &name, bracket_t btype=b_none, parent_rel_t ptype=p_none)
 
 str_node (const std::u32string &name, bracket_t btype=b_none, parent_rel_t ptype=p_none)
 
bool operator== (const str_node &) const
 
bool operator< (const str_node &) const
 
void flip_parent_rel ()
 Change the parent relation from sub to super and vice versa (throws error when this is not an index). More...
 
bool is_zero () const
 
bool is_identity () const
 
bool is_rational () const
 
bool is_unsimplified_rational () const
 
bool is_integer () const
 
bool is_unsimplified_integer () const
 
bool is_index () const
 
bool is_quoted_string () const
 
bool is_command () const
 
bool is_inert_command () const
 
bool is_name_wildcard () const
 
bool is_object_wildcard () const
 
bool is_range_wildcard () const
 
bool is_siblings_wildcard () const
 
bool is_autodeclare_wildcard () const
 
bool is_indexstar_wildcard () const
 
bool is_indexplus_wildcard () const
 
bool is_numbered_symbol () const
 
nset_t::iterator name_only ()
 

Static Public Member Functions

static bool compare_names_only (const str_node &, const str_node &)
 
static bool compare_name_brack_par (const str_node &, const str_node &)
 
static bool compare_name_inverse_par (const str_node &, const str_node &)
 

Public Attributes

nset_t::iterator name
 
rset_t::iterator multiplier
 
flag_t fl
 

Member Enumeration Documentation

◆ bracket_t

Enumerator
b_round 
b_square 
b_curly 
b_pointy 
b_none 
b_no 
b_invalid 

◆ parent_rel_t

Child nodes are related to their parent node by a so-called parent relation, which can be one of these values.

Enumerator
p_sub 
p_super 
p_none 
p_property 
p_exponent 
p_components 
p_invalid 

Constructor & Destructor Documentation

◆ str_node() [1/4]

cadabra::str_node::str_node ( void  )

◆ str_node() [2/4]

cadabra::str_node::str_node ( nset_t::iterator  name,
bracket_t  btype = b_none,
parent_rel_t  ptype = p_none 
)

◆ str_node() [3/4]

cadabra::str_node::str_node ( const std::string &  name,
bracket_t  btype = b_none,
parent_rel_t  ptype = p_none 
)

◆ str_node() [4/4]

cadabra::str_node::str_node ( const std::u32string &  name,
bracket_t  btype = b_none,
parent_rel_t  ptype = p_none 
)

Member Function Documentation

◆ compare_name_brack_par()

bool cadabra::str_node::compare_name_brack_par ( const str_node one,
const str_node two 
)
static

◆ compare_name_inverse_par()

bool cadabra::str_node::compare_name_inverse_par ( const str_node one,
const str_node two 
)
static

◆ compare_names_only()

bool cadabra::str_node::compare_names_only ( const str_node one,
const str_node two 
)
static

◆ flip_parent_rel()

void cadabra::str_node::flip_parent_rel ( )

Change the parent relation from sub to super and vice versa (throws error when this is not an index).

◆ is_autodeclare_wildcard()

bool cadabra::str_node::is_autodeclare_wildcard ( ) const

◆ is_command()

bool cadabra::str_node::is_command ( ) const

◆ is_identity()

bool cadabra::str_node::is_identity ( ) const

◆ is_index()

bool cadabra::str_node::is_index ( ) const

◆ is_indexplus_wildcard()

bool cadabra::str_node::is_indexplus_wildcard ( ) const

◆ is_indexstar_wildcard()

bool cadabra::str_node::is_indexstar_wildcard ( ) const

◆ is_inert_command()

bool cadabra::str_node::is_inert_command ( ) const

◆ is_integer()

bool cadabra::str_node::is_integer ( ) const

◆ is_name_wildcard()

bool cadabra::str_node::is_name_wildcard ( ) const

◆ is_numbered_symbol()

bool cadabra::str_node::is_numbered_symbol ( ) const

◆ is_object_wildcard()

bool cadabra::str_node::is_object_wildcard ( ) const

◆ is_quoted_string()

bool cadabra::str_node::is_quoted_string ( ) const

◆ is_range_wildcard()

bool cadabra::str_node::is_range_wildcard ( ) const

◆ is_rational()

bool cadabra::str_node::is_rational ( ) const

◆ is_siblings_wildcard()

bool cadabra::str_node::is_siblings_wildcard ( ) const

◆ is_unsimplified_integer()

bool cadabra::str_node::is_unsimplified_integer ( ) const

◆ is_unsimplified_rational()

bool cadabra::str_node::is_unsimplified_rational ( ) const

◆ is_zero()

bool cadabra::str_node::is_zero ( ) const

◆ name_only()

nset_t::iterator cadabra::str_node::name_only ( )

◆ operator<()

bool cadabra::str_node::operator< ( const str_node other) const

◆ operator==()

bool cadabra::str_node::operator== ( const str_node other) const

Member Data Documentation

◆ fl

flag_t cadabra::str_node::fl

◆ multiplier

rset_t::iterator cadabra::str_node::multiplier

◆ name

nset_t::iterator cadabra::str_node::name

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