Skip to content

Commit

Permalink
refactor: moved unprocessed_variable_update_function where it belongs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukáš Chudíček committed Jan 14, 2024
1 parent 2dda391 commit 2be2439
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 32 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub mod test_utils; // TODO:
// to have it accessible from outside binaries.
mod expression_components;
mod symbolic_domains;
mod system;
mod update;
mod utils;
mod xml_parsing;
28 changes: 0 additions & 28 deletions src/system.rs

This file was deleted.

1 change: 1 addition & 0 deletions src/update/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub mod unprocessed_variable_update_function;
pub mod update_fn;
25 changes: 25 additions & 0 deletions src/update/unprocessed_variable_update_function.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use crate::expression_components::expression::Expression;

#[derive(Debug)]
pub struct UnprocessedVariableUpdateFn<T> {
pub input_vars_names: Vec<String>,
pub target_var_name: String,
pub terms: Vec<(T, Expression<T>)>,
pub default: T,
}

impl<T> UnprocessedVariableUpdateFn<T> {
pub fn new(
input_vars_names: Vec<String>,
target_var_name: String,
terms: Vec<(T, Expression<T>)>,
default: T,
) -> Self {
Self {
input_vars_names,
target_var_name,
terms,
default,
}
}
}
4 changes: 2 additions & 2 deletions src/update/update_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use biodivine_lib_bdd::{
use crate::{
expression_components::{expression::Expression, proposition::Proposition},
symbolic_domains::symbolic_domain::{SymbolicDomain, SymbolicDomainOrd},
system::variable_update_function::UnprocessedVariableUpdateFn,
update::unprocessed_variable_update_function::UnprocessedVariableUpdateFn,
};

use self::variable_update_fn::VariableUpdateFn;
Expand Down Expand Up @@ -805,7 +805,7 @@ pub mod variable_update_fn {
proposition::{ComparisonOperator as CmpOp, Proposition},
},
symbolic_domains::symbolic_domain::SymbolicDomainOrd,
system::variable_update_function::UnprocessedVariableUpdateFn as UnprocessedFn,
update::unprocessed_variable_update_function::UnprocessedVariableUpdateFn as UnprocessedFn,
};

#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/xml_parsing/variable_update_fn_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use xml::reader::XmlEvent;

use crate::{
expression_components::expression::Expression,
system::variable_update_function::UnprocessedVariableUpdateFn,
update::unprocessed_variable_update_function::UnprocessedVariableUpdateFn,
};

use super::{
Expand Down

0 comments on commit 2be2439

Please sign in to comment.