|
TeDDy 4.1.0
Decision diagram library.
|
Manager for BDDs and analysis of Binary State System. More...
#include <reliability.hpp>
Public Member Functions | |
| bss_manager (int32 componentCount, int64 nodePoolSize, std::vector< int32 > order=default_oder()) | |
| Initializes BSS manager. | |
| bss_manager (int32 componentCount, int64 nodePoolSize, int64 overflowNodePoolSize, std::vector< int32 > order=default_oder()) | |
| Initializes BSS manager. | |
Public Member Functions inherited from teddy::reliability_manager< degrees::fixed< 2 >, domains::fixed< 2 > > | |
| auto | calculate_probabilities (Ps const &probs, diagram_t const &diagram) -> void |
| Calculates probabilities of system states 0 and 1. | |
| auto | calculate_probabilities (Ps const &probs, diagram_t const &diagram) -> void |
| Calculates probabilities of all system states. | |
| auto | calculate_probability (Ps const &probs, diagram_t const &diagram) -> double |
| Calculates and returns probability of system state 1. | |
| auto | calculate_probability (int32 state, Ps const &probs, diagram_t const &diagram) -> double |
Calculates and returns probability of a system state state. | |
| auto | get_probability (int32 state) const -> double |
| Returns probability of given system state. | |
| auto | calculate_availability (Ps const &probs, diagram_t const &diagram) -> utils::second_t< Foo, double > |
| Calculates and returns availability of a BSS. | |
| auto | calculate_availability (int32 state, Ps const &probs, diagram_t const &diagram) -> double |
Calculates and returns system availability with respect to the system state state. | |
| auto | get_availability () const -> utils::second_t< Foo, double > |
| Returns availability of a BSS. | |
| auto | get_availability (int32 state) const -> double |
Returns system availability with respect to the system state state. | |
| auto | calculate_unavailability (Ps const &probs, diagram_t const &diagram) -> utils::second_t< Foo, double > |
| Calculates and returns unavailability of a BSS. | |
| auto | calculate_unavailability (int32 state, Ps const &probs, diagram_t const &diagram) -> double |
Calculates and returns system availability with respect to the system state state. | |
| auto | get_unavailability () -> utils::second_t< Foo, double > |
| Returns system unavailability of a BSS. | |
| auto | get_unavailability (int32 state) -> double |
Returns system unavailability with respect to the system state state. | |
| auto | state_frequency (diagram_t const &diagram, int32 state) -> double |
Returns system state frequency of state state. | |
| auto | dpld (var_change varChange, FChange fChange, diagram_t const &diagram) -> diagram_t |
| Calculates Direct Partial Boolean Derivative. | |
| auto | to_dpld_e (int32 varFrom, int32 varIndex, diagram_t const &dpld) -> diagram_t |
Transforms dpld into Extended DPLD. | |
| auto | structural_importance (diagram_t const &dpld) -> double |
| Calculates Structural Importace (SI) of a component. | |
| auto | birnbaum_importance (Ps const &probs, diagram_t const &dpld) -> double |
| Calculates Birnbaum importance (BI) of a component. | |
| auto | fussell_vesely_importance (Ps const &probs, diagram_t const &dpld, double unavailability, int32 componentState, int32 componentIndex) -> double |
| Calculates Fussell-Vesely importance (FVI) of a component. | |
| auto | mcvs (diagram_t const &diagram, int32 state) -> std::vector< Vars > |
Finds all Minimal Cut Vector (MCVs) of the system with respect to the system state State. | |
| auto | mpvs (diagram_t const &diagram, int32 state) -> std::vector< Vars > |
Finds all Minimal Path Vector (MPVs) of the system with respect to the system state state. | |
| auto | mcvs_g (diagram_t const &diagram, int32 state, Out out) -> void |
Finds all Minimal Cut Vector of the system with respect to the system state state. | |
| auto | mpvs_g (diagram_t const &diagram, int32 state, Out out) -> void |
Finds all Minimal Path Vector (MPVs) of the system with respect to the system state state. | |
Public Member Functions inherited from teddy::diagram_manager< Data, Degree, Domain > | |
| auto | constant (int32 val) -> diagram_t |
| Creates diagram representing constant function. | |
| auto | variable (int32 index) -> diagram_t |
| Creates diagram representing function of single variable. | |
| template<class Foo = void> requires (is_bdd<Degree>) | |
| auto | variable_not (int32 index) -> utils::second_t< Foo, diagram_t > |
| Creates BDD representing function of complemented variable. | |
| auto | operator() (int32 index) -> diagram_t |
| Creates diagram representing function of single variable. | |
| template<std::convertible_to< int32 > T> | |
| auto | variables (std::initializer_list< T > indices) -> std::vector< diagram_t > |
| Creates vector of diagrams representing single variables. | |
| template<std::input_iterator I, std::sentinel_for< I > S> | |
| auto | variables (I first, S last) -> std::vector< diagram_t > |
| Creates vector of diagrams representing functions of single variables. | |
| template<std::ranges::input_range Is> | |
| auto | variables (Is const &indices) -> std::vector< diagram_t > |
| Creates vector of diagrams representing single variables. | |
| template<std::input_iterator I, std::sentinel_for< I > S> | |
| auto | from_vector (I first, S last) -> diagram_t |
| Creates diagram from a truth vector of a function. | |
| template<std::ranges::input_range R> | |
| auto | from_vector (R &&vector) -> diagram_t |
| Creates diagram from a truth vector of a function. | |
| auto | to_vector (diagram_t const &diagram) const -> std::vector< int32 > |
| Creates truth vector from the diagram. | |
| template<std::output_iterator< teddy::int32 > O> | |
| auto | to_vector_g (diagram_t const &diagram, O out) const -> void |
| Creates truth vector from the diagram. | |
| template<class Foo = void> requires (is_bdd<Degree>) | |
| auto | from_pla (pla_file const &file, fold_type foldType=fold_type::Tree) -> utils::second_t< Foo, std::vector< diagram_t > > |
| Creates BDDs defined by PLA file. | |
| template<expression_node Node> | |
| auto | from_expression_tree (Node const &root) -> diagram_t |
| Creates diagram from an expression tree (AST). | |
| template<teddy_bin_op Op> | |
| auto | apply (diagram_t const &lhs, diagram_t const &rhs) -> diagram_t |
| Merges two diagrams using given binary operation. | |
| template<teddy_bin_op Op, class... Diagram> | |
| auto | apply_n (Diagram const &... diagrams) -> diagram_t |
| TODO. | |
| template<teddy_bin_op Op, std::ranges::input_range R> | |
| auto | left_fold (R const &diagrams) -> diagram_t |
Merges diagams in the range using the apply function and binary operation. | |
| template<teddy_bin_op Op, std::input_iterator I, std::sentinel_for< I > S> | |
| auto | left_fold (I first, S last) -> diagram_t |
Merges diagams in the range using the apply function and binary operation. | |
| template<teddy_bin_op Op, std::ranges::random_access_range R> | |
| auto | tree_fold (R &diagrams) -> diagram_t |
Merges diagams in the range using the apply function and binary operation. | |
| template<teddy_bin_op Op, std::random_access_iterator I, std::sentinel_for< I > S> | |
| auto | tree_fold (I first, S last) -> diagram_t |
Merges diagams in the range using the apply function and binary operation. | |
| template<in_var_values Vars> | |
| auto | evaluate (diagram_t const &diagram, Vars const &values) const -> int32 |
| Evaluates value of the function represented by the diagram. | |
| auto | satisfy_count (int32 value, diagram_t const &diagram) -> int64 |
| Calculates number of variable assignments for which the functions evaluates to certain value. | |
| template<out_var_values Vars> | |
| auto | satisfy_one (int32 value, diagram_t const &diagram) -> std::optional< Vars > |
Finds variable assignment for which diagram evaluates to value. | |
| template<out_var_values Vars> | |
| auto | satisfy_all (int32 value, diagram_t const &diagram) const -> std::vector< Vars > |
| Enumerates all elements of the satisfying set. | |
| template<out_var_values Vars, std::output_iterator< Vars > O> | |
| auto | satisfy_all_g (int32 value, diagram_t const &diagram, O out) const -> void |
| Enumerates all elements of the satisfying set. | |
| auto | get_cofactor (diagram_t const &diagram, int32 varIndex, int32 varValue) -> diagram_t |
| Calculates cofactor of the functions. | |
| auto | get_cofactor (diagram_t const &diagram, std::vector< var_cofactor > const &vars) -> diagram_t |
| template<int_to_int F> | |
| auto | transform (diagram_t const &diagram, F transformer) -> diagram_t |
| Transforms values of the function. | |
| template<class Foo = void> requires (is_bdd<Degree>) | |
| auto | negate (diagram_t const &diagram) -> utils::second_t< Foo, diagram_t > |
| Negates Boolean function. | |
| auto | get_dependency_set (diagram_t const &diagram) const -> std::vector< int32 > |
| Enumerates indices of variables that the function depends on. | |
| template<std::output_iterator< int32 > O> | |
| auto | get_dependency_set_g (diagram_t const &diagram, O out) const -> void |
| Enumerates indices of variables that the function depends on. | |
| auto | reduce (diagram_t const &diagram) -> diagram_t |
| Reduces diagrams to its canonical form. | |
| auto | get_node_count () const -> int64 |
| Returns number of nodes that are currently used by the manager. | |
| auto | get_node_count (diagram_t const &diagram) const -> int64 |
| Returns number of nodes in the diagram including terminal nodes. | |
| auto | to_dot_graph (std::ostream &out) const -> void |
| Prints dot representation of the graph. | |
| auto | to_dot_graph (std::ostream &out, diagram_t const &diagram) const -> void |
| Prints dot representation of the diagram. | |
| auto | force_gc () -> void |
| Runs garbage collection. | |
| auto | force_reorder () -> void |
| Runs variable reordering heuristic. | |
| auto | clear_cache () -> void |
| Clears apply cache. | |
| auto | get_var_count () const -> int32 |
| Returns number of variables for this manager set in the constructor. | |
| auto | get_order () const -> std::vector< int32 > const & |
| Returns current order of variables. | |
| auto | get_domains () const -> std::vector< int32 > |
| Return domains of variables. | |
| auto | set_cache_ratio (double ratio) -> void |
| Sets the relative cache size w.r.t the number of nodes. | |
| auto | set_gc_ratio (double ratio) -> void |
| Sets ratio used to determine new node pool allocation. | |
| auto | set_auto_reorder (bool doReorder) -> void |
| Enables or disables automatic variable reordering. | |
| diagram_manager (diagram_manager &&) noexcept=default | |
| auto | operator= (diagram_manager &&) noexcept -> diagram_manager &=default |
| diagram_manager (diagram_manager const &)=delete | |
| auto | operator= (diagram_manager const &) -> diagram_manager &=delete |
| template<out_var_values Vars, std::output_iterator< Vars > OutputIt> | |
| auto | satisfy_all_g (int32 const value, diagram_t const &diagram, OutputIt out) const -> void |
Additional Inherited Members | |
Public Types inherited from teddy::reliability_manager< degrees::fixed< 2 >, domains::fixed< 2 > > | |
| using | diagram_t = typename diagram_manager< double, degrees::fixed< 2 >, domains::fixed< 2 > >::diagram_t |
Public Types inherited from teddy::diagram_manager< Data, Degree, Domain > | |
| using | diagram_t = diagram< Data, Degree > |
| Alias for the diagram type used in the functions of this manager. | |
Protected Types inherited from teddy::diagram_manager< Data, Degree, Domain > | |
| using | node_t = typename diagram< Data, Degree >::node_t |
| using | son_container = typename node_t::son_container |
Protected Member Functions inherited from teddy::reliability_manager< degrees::fixed< 2 >, domains::fixed< 2 > > | |
| reliability_manager (int32 varCount, int64 nodePoolSize, int64 overflowNodePoolSize, std::vector< int32 > order) | |
| reliability_manager (int32 varCount, int64 nodePoolSize, int64 overflowNodePoolSize, domains::mixed domain, std::vector< int32 > order) | |
Protected Member Functions inherited from teddy::diagram_manager< Data, Degree, Domain > | |
| diagram_manager (int32 varCount, int64 nodePoolSize, int64 extraNodePoolSize, std::vector< int32 > order) | |
| Initializes diagram manager. | |
| diagram_manager (int32 varCount, int64 nodePoolSize, int64 extraNodePoolSize, domains::mixed domain, std::vector< int32 > order) | |
| Initializes diagram manager. | |
Protected Attributes inherited from teddy::diagram_manager< Data, Degree, Domain > | |
| node_manager< Data, Degree, Domain > | nodes_ |
Manager for BDDs and analysis of Binary State System.
|
inline |
Initializes BSS manager.
| componentCount | Number of components |
| nodePoolSize | Size of the main node pool |
| order | Order of variables. Variables are ordered by their indices by default |
|
inline |
Initializes BSS manager.
| componentCount | Number of components |
| nodePoolSize | Size of the main node pool |
| overflowNodePoolSize | Size of the additional node pools |
| order | Order of variables. Variables are ordered by their indices by default |