Fleet  0.0.9
Inference in the LOT
Public Member Functions | Public Attributes | List of all members
BindingTree Class Reference

#include <BindingTree.h>

Inheritance diagram for BindingTree:
Inheritance graph
[legend]
Collaboration diagram for BindingTree:
Collaboration graph
[legend]

Public Member Functions

 BindingTree ()
 
 BindingTree (const SExpression::SExpNode &n)
 This is a convertion from S-expression parsing. More...
 
 BindingTree (const BindingTree &t)
 
 BindingTree (const BindingTree &&t)
 
void operator= (const BindingTree &t)
 
void operator= (const BindingTree &&t)
 
BindingTreeget_target ()
 
BindingTreecoreferent ()
 
std::string string (bool usedot=true) const override
 
std::string my_string () const override
 
- Public Member Functions inherited from BaseNode< BindingTree >
 BaseNode (size_t n=0, BindingTree *p=nullptr, size_t i=0)
 Constructor of basenode – sizes children to n. More...
 
 BaseNode (const BindingTree &n)
 
 BaseNode (BindingTree &&n)
 
void operator= (const BindingTree &t)
 
void operator= (const BindingTree &&t)
 
void make_root ()
 Make a node root – just nulls the parent. More...
 
virtual ~BaseNode ()
 
virtual bool operator== (const BindingTree &n) const
 
NodeIterator begin () const
 
NodeIterator end () const
 
virtual bool operator!= (const BindingTree &n) const
 
void reserve_children (const size_t n)
 
decltype(children) & get_children ()
 
decltype(children) const & get_children () const
 
BindingTreechild (const size_t i)
 
const BindingTreechild (const size_t i) const
 
void fill (size_t n, Args... args)
 
size_t nchildren () const
 
BindingTreeleft_descend () const
 
size_t depth () const
 
void fix_child_info ()
 
void check_child_info () const
 
BindingTreeoperator[] (const size_t i)
 
const BindingTreeoperator[] (const size_t i) const
 
void set_child (const size_t i, BindingTree &n)
 
void set_child (const size_t i, BindingTree &&n)
 
void push_back (BindingTree &n)
 
void push_back (BindingTree &&n)
 
virtual bool is_root () const
 Am I a root node? I am if my parent is nullptr. More...
 
BindingTreeroot ()
 Find the root of this node by walking up the tree. More...
 
BindingTreeget_via (std::function< bool(BindingTree &)> &f)
 Return a pointer to the first node satisfying predicate f, in standard traversal; nullptr otherwise. More...
 
virtual size_t count () const
 How many nodes total are below me? More...
 
virtual size_t count (const BindingTree &n) const
 How many nodes below me are equal to n? More...
 
virtual bool is_terminal () const
 Am I a terminal? I am if I have no children. More...
 
virtual size_t count_terminals () const
 
virtual BindingTreeget_nth (int n, std::function< int(const BindingTree &)> &f)
 
virtual BindingTreeget_nth (int n)
 
sum (std::function< T(const BindingTree &)> &f) const
 
sum (T(*f)(const BindingTree &)) const
 
bool all (std::function< bool(const BindingTree &)> &f) const
 
void map (const std::function< void(BindingTree &)> &f)
 
void show (size_t t=0) const
 

Public Attributes

int referent
 
bool target
 
int linear_order
 
POS pos
 
std::string label
 
std::string word
 
- Public Attributes inherited from BaseNode< BindingTree >
BindingTreeparent
 
size_t pi
 

Additional Inherited Members

- Static Public Attributes inherited from BaseNode< BindingTree >
static NodeIterator EndNodeIterator
 
- Protected Attributes inherited from BaseNode< BindingTree >
std::vector< BindingTreechildren
 

Detailed Description

Author
piantado
Date
27/03/20

Constructor & Destructor Documentation

◆ BindingTree() [1/4]

BindingTree::BindingTree ( )
inline

◆ BindingTree() [2/4]

BindingTree::BindingTree ( const SExpression::SExpNode n)
inline

This is a convertion from S-expression parsing.

Parameters
s

◆ BindingTree() [3/4]

BindingTree::BindingTree ( const BindingTree t)
inline

◆ BindingTree() [4/4]

BindingTree::BindingTree ( const BindingTree &&  t)
inline

Member Function Documentation

◆ coreferent()

BindingTree* BindingTree::coreferent ( )
inline

◆ get_target()

BindingTree* BindingTree::get_target ( )
inline

◆ my_string()

std::string BindingTree::my_string ( ) const
inlineoverridevirtual

Reimplemented from BaseNode< BindingTree >.

◆ operator=() [1/2]

void BindingTree::operator= ( const BindingTree t)
inline

◆ operator=() [2/2]

void BindingTree::operator= ( const BindingTree &&  t)
inline

◆ string()

std::string BindingTree::string ( bool  usedot = true) const
inlineoverridevirtual

Reimplemented from BaseNode< BindingTree >.

Member Data Documentation

◆ label

std::string BindingTree::label

◆ linear_order

int BindingTree::linear_order

◆ pos

POS BindingTree::pos

◆ referent

int BindingTree::referent

◆ target

bool BindingTree::target

◆ word

std::string BindingTree::word

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