pub trait DisplayCoef {
// Required methods
fn has_negative_sign(&self) -> bool;
fn needs_parentheses(&self) -> bool;
}Expand description
A coefficent that can be displayed in a linear combination.
Required Methods§
Sourcefn has_negative_sign(&self) -> bool
fn has_negative_sign(&self) -> bool
Does coefficent have a negative sign?
In contrast to the is_negative method of num_traits::Signed, this
is about syntax rather than denotion. For example, the symbolic
expression -k has a negative sign, but may or may not denote a
negative number, depending on whether k itself takes a positive value.
Sourcefn needs_parentheses(&self) -> bool
fn needs_parentheses(&self) -> bool
Does the coefficient need to be parenthesized when displayed?