Struct arthroprod::types::Alpha
[−]
[src]
pub struct Alpha { /* fields omitted */ }
The base element for computation with Absolute Relativity.
An Alpha is a Component along with an associated Sign. All values and mathematical operators within the algebra are required to be paired with their correct Alpha value under the principle of Absolute Relativity.
Methods
impl Alpha
[src]
fn new(ix: &str) -> Result<Alpha>
[src]
create a new alpha from an string index containing an optional sign prefix.
NOTE: This will panic if the index is invalid in order to prevent the user from running inconsistant calculations.
fn new_override(
ix: &str,
sign: Sign,
allowed: &HashSet<Component>
) -> Result<Alpha>
[src]
ix: &str,
sign: Sign,
allowed: &HashSet<Component>
) -> Result<Alpha>
new_override allows the caller to explicitly specify an index, sign and allowed set of alphas when creating an alpha.
fn from_index(index: &Component, sign: &Sign) -> Alpha
[src]
Construct an Alpha explicitly from a Component and a Sign.
fn is_point(&self) -> bool
[src]
Check to see if an alpha is +/-αp
fn index(&self) -> &Component
[src]
Return a copy of this Alpha's index
fn sign(&self) -> &Sign
[src]
Return a copy of this Alpha's sign
fn as_vec(&self) -> Vec<Index>
[src]
Return a Vector of Indices representing this Alpha's Indices
Trait Implementations
impl Debug for Alpha
[src]
impl Eq for Alpha
[src]
impl PartialEq for Alpha
[src]
fn eq(&self, __arg_0: &Alpha) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Alpha) -> bool
[src]
This method tests for !=
.
impl Ord for Alpha
[src]
fn cmp(&self, __arg_0: &Alpha) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for Alpha
[src]
fn partial_cmp(&self, __arg_0: &Alpha) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Alpha) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Alpha) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Alpha) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Alpha) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Copy for Alpha
[src]
impl Clone for Alpha
[src]
fn clone(&self) -> Alpha
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more