Expand description
Interval operations and types
Structs§
- Interval
- The
Intervalstruct represents a range of values with a lower bound (lb) and an upper bound (ub).
Traits§
- Enlarge
- The above code is defining a trait named
Enlargein Rust. This trait has an associated typeOutputand a methodenlarge_withthat takes a reference toselfand a parameteralphaof typeT. The method returns an object of typeOutput. This trait can be implemented for types to provide the functionality of enlarging or modifying the object with the providedalphavalue. - Hull
- The above code is defining a trait named
Hullin Rust. This trait has a generic typeTthat must be sized. It also has an associated typeOutput. The trait has a methodhull_withthat takes a reference to another object of typeTand returns an object of typeOutput. This trait can be implemented for different types to provide thehull_withfunctionality. - Intersect
- The above code is defining a trait in Rust called
Intersect. This trait has one associated typeOutputand one methodintersect_withthat takes a reference to another object of typeTand returns an object of typeOutput. This trait can be implemented for various types to provide custom intersection behavior.