LogiXpr
Loading...
Searching...
No Matches
evaluator.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "expression.h"
9#include <vector>
10#include <cmath>
11
12
27std::vector<std::unordered_map<std::string, bool>> getTruthTableInputs(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs);
28
37bool evaluateExpression(std::shared_ptr<Expression> expression, std::unordered_map<std::string, bool> inputs);
38
47bool isEquivalent(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs);
48
Header file for expression class.
std::vector< std::unordered_map< std::string, bool > > getTruthTableInputs(std::shared_ptr< Expression > lhs, std::shared_ptr< Expression > rhs)
Generate the truth table inputs for the given expressions.
Definition evaluator.cpp:8
bool isEquivalent(std::shared_ptr< Expression > lhs, std::shared_ptr< Expression > rhs)
Check if two expressions are equivalent.
Definition evaluator.cpp:60
bool evaluateExpression(std::shared_ptr< Expression > expression, std::unordered_map< std::string, bool > inputs)
Evaluate the expression with the given inputs.
Definition evaluator.cpp:31