pub trait TropicalObjective<T: Float> {
// Required method
fn evaluate(&self, x: &[TropicalNumber<T>]) -> TropicalNumber<T>;
// Provided methods
fn is_tropical_convex(&self) -> bool { ... }
fn tropical_subgradient(
&self,
_x: &[TropicalNumber<T>],
) -> Option<Vec<TropicalNumber<T>>> { ... }
}Expand description
Trait for tropical objective functions
Required Methods§
Sourcefn evaluate(&self, x: &[TropicalNumber<T>]) -> TropicalNumber<T>
fn evaluate(&self, x: &[TropicalNumber<T>]) -> TropicalNumber<T>
Evaluate the tropical objective function
Provided Methods§
Sourcefn is_tropical_convex(&self) -> bool
fn is_tropical_convex(&self) -> bool
Check if the function is tropical convex
Sourcefn tropical_subgradient(
&self,
_x: &[TropicalNumber<T>],
) -> Option<Vec<TropicalNumber<T>>>
fn tropical_subgradient( &self, _x: &[TropicalNumber<T>], ) -> Option<Vec<TropicalNumber<T>>>
Compute tropical subdifferential (if available)