Crate computation_types

Source
Expand description

Types for abstract mathematical computation.

Note, Documentation is currently lacking. The best way to learn about this framework is to read the tests and see how it is used to implement algorithms in Optimal.

§Examples

use computation_types::{named_args, val, Run};

let one_plus_one = val!(1) + val!(1);
assert_eq!(one_plus_one.to_string(), "(1 + 1)");
assert_eq!(one_plus_one.run(), 2);

Re-exports§

pub use crate::run::Run;
pub use crate::arg::*;
pub use crate::val::*;

Modules§

arg
black_box
cmp
control_flow
enumerate
len
linalg
macros
math
peano
rand
run
sum
val
zip

Macros§

arg
arg1
arg2
impl_computation_fn_for_binary
impl_computation_fn_for_unary
impl_core_ops
impl_display_for_inline_binary
named_args
names
val
val1
val2

Structs§

Function
NamedArgs
Names

Enums§

PartitionErr
PopErr

Traits§

AnyArg
Computation
A type representing a computation.
ComputationFn
A type representing a function-like computation.

Type Aliases§

Name