Table endpoint for generating a truth table from a string expression
This commit is contained in:
@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::expressions::expression::Expression;
|
||||
use crate::map;
|
||||
use crate::routing::options::TruthTableOptions;
|
||||
use crate::utils::array::Distinct;
|
||||
|
||||
type TruthMatrix = Vec<Vec<bool>>;
|
||||
@ -34,12 +35,6 @@ pub enum Sort {
|
||||
FalseFirst,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Deserialize)]
|
||||
pub struct TruthTableOptions {
|
||||
pub sort: Sort,
|
||||
pub hide: Hide,
|
||||
}
|
||||
|
||||
impl TruthTable {
|
||||
pub fn new(expression: &Expression, options: TruthTableOptions) -> Self {
|
||||
let header = Self::extract_header(expression);
|
||||
|
Reference in New Issue
Block a user