SyTen
parse_operator.h File Reference

Operator parser for BTT lattices resulting in BTTO. More...

#include <stack>
#include "inc/btt/btt_lattice.h"
+ Include dependency graph for parse_operator.h:
+ This graph shows which files directly or indirectly include this file:

Classes

class  syten::BTT::ParseOperator::NotDefinition
 Thrown when parse() gets a string that is not an operator definition of the form A:O More...
 
struct  syten::BTT::ParseOperator::StackElement
 One element of the parsing stack. More...
 

Namespaces

 syten
 The topmost namespace for this project.
 
 syten::BTT
 The namespace containing binary tree tensor networks.
 
 syten::BTT::ParseOperator
 Support classes and functions related to BTT operator parsing.
 

Typedefs

typedef void(* syten::BTT::ParseOperator::StackElementParser) (std::stack< StackElement > &stack, Lattice const &lat, Index position)
 Type of a function parsing one element of the supplied stack assuming the supplied lattice. More...
 

Enumerations

enum  syten::BTT::ParseOperator::StackElementType { String, Sector, Number, Operator }
 Denotes the type of element stored on the stack. More...
 

Functions

StackElementParser syten::BTT::ParseOperator::getFunction (std::string token)
 Return the function matching the token specified. More...
 
Operator syten::BTT::parse (Lattice const &lat, std::string const &desc)
 Parse an operator description. More...
 
Operator syten::BTT::parse (std::string const &desc)
 Parse a lattice:operator description. More...
 
Functions implementing operations on the parsing stack
void syten::BTT::ParseOperator::operatorF (std::stack< StackElement > &s, Lattice const &lat, Index position)
 Create a global operator from the topmost element: x_str|x_num|x_opr _o → x_opr More...
 
void syten::BTT::ParseOperator::siteF (std::stack< StackElement > &s, Lattice const &lat, Index position)
 Create a single-site operator from the two topmost elements: a_str b_str _s → a(b) More...
 
void syten::BTT::ParseOperator::sectorF (std::stack< StackElement > &s, Lattice const &lat, Index position)
 Create a sector from the topmost element: x_str → x_sec More...
 
void syten::BTT::ParseOperator::multF (std::stack< StackElement > &s, Lattice const &lat, Index position)
 Multiply the two topmost elements: a_opr|a_num b_opr|b_num → a * b, a is applied first. More...
 
void syten::BTT::ParseOperator::dotqF (std::stack< StackElement > &s, Lattice const &lat, Index position)
 Scalar product of two operators in the specified quantum number sector: a_opr b_opr q_sec → dot(a,b,q) More...
 
void syten::BTT::ParseOperator::dotF (std::stack< StackElement > &s, Lattice const &lat, Index position)
 Scalar product of two operators in the vacuum quantum number sector: a_opr b_opr _dot → dot(a,b), calls dotqF() if top of stack is sector. More...
 
void syten::BTT::ParseOperator::addF (std::stack< StackElement > &s, Lattice const &lat, Index position)
 Addition of two operators or two numbers: a_num b_num → a+b | a_opr b_opr → a+b More...
 

Detailed Description

Operator parser for BTT lattices resulting in BTTO.