25#ifndef SUBSTITUTION_HPP
26#define SUBSTITUTION_HPP
32#include "vic_strings.hpp"
46using SubPair = pair<Variable*, Term*>;
74 size_t size()
const {
return sub.size(); }
117 vector<SubPair>::iterator
begin() {
return sub.begin(); }
121 vector<SubPair>::iterator
end() {
return sub.end(); }
125 vector<SubPair>::const_iterator
cbegin() {
return sub.cbegin(); }
129 vector<SubPair>::const_iterator
cend() {
return sub.cend(); }
131 friend ostream& operator<<(ostream&,
const Substitution&);
General representation of a substitution.
vector< SubPair >::const_iterator cend()
Iteration is just iteration over the vector of pairs.
vector< SubPair >::iterator end()
Iteration is just iteration over the vector of pairs.
string make_LaTeX(bool=false) const
Make a useable LaTeX representation.
void backtrack() const
Remove a substitution everywhere.
void push_back(Variable *, Term *)
Add a pair to a substitution.
vector< SubPair >::const_iterator cbegin()
Iteration is just iteration over the vector of pairs.
size_t size() const
Trivial get method.
Substitution()
Trivial constructor.
vector< SubPair > sub
A single substitution is just a pointer to the Variable being sustituted, and a pointer to the Term t...
void clear()
Clear a substitution.
void apply() const
Apply a substitution everywhere.
vector< SubPair >::iterator begin()
Iteration is just iteration over the vector of pairs.
string to_string(bool=false) const
Make a string representation.
General representation of terms.
Basic representation of variables.