Enum mexprp::Answer [] [src]

pub enum Answer<N: Num> {
    Single(N),
    Multiple(Vec<N>),
}

An answer of an evaluatation. Can be either a single answer or multiple. This struct contains some helper methods for performing operations on single or multiple answers. The op method takes another Num, and a function with two Num arguments, itself and the other (as references). It performs that function on all combinations and returns an answer with all of the results in one. The unop function is similar but it performs an operation on only itself, without another value (unary operation).

Variants

A single answer

Multiple answers. Will always be at least two (probably)

Methods

impl<N: Num> Answer<N>
[src]

[src]

Perform an operation on all the values of an answer with all the values of another answer

[src]

Perform an operation on all the values of an answer

[src]

Unwrap the single variant of an answer

[src]

Convert this answer into a vector

[src]

Adds all the answers of another answer to the asnwers of this answer, returning a new answer

Trait Implementations

impl<N: Num> From<Answer<N>> for Term<N>
[src]

[src]

Performs the conversion.

impl<N: Debug + Num> Debug for Answer<N>
[src]

[src]

Formats the value using the given formatter. Read more

impl<N: Clone + Num> Clone for Answer<N>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: PartialEq + Num> PartialEq for Answer<N>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<N: Num> Display for Answer<N>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<N> Send for Answer<N> where
    N: Send

impl<N> Sync for Answer<N> where
    N: Sync