pub struct CulvertBarrel { /* private fields */ }Expand description
Admitted culvert barrel cross-section, with dimensions in metres.
Implementations§
Source§impl CulvertBarrel
impl CulvertBarrel
Sourcepub fn horizontal_ellipse(
span_m: f64,
rise_m: f64,
side_radius_m: f64,
) -> Result<Self, StructureError>
pub fn horizontal_ellipse( span_m: f64, rise_m: f64, side_radius_m: f64, ) -> Result<Self, StructureError>
Admits a four-arc horizontal ellipse of span span_m, rise rise_m and side radius
side_radius_m.
The invert and crown arcs share one radius, derived from tangency. Rejects a span at or below the rise and a side radius at or above half the rise. Also rejects as the box constructor does, and when a radius cubed, scaled by 64, overflows F64.
Sourcepub fn vertical_ellipse(
span_m: f64,
rise_m: f64,
end_radius_m: f64,
) -> Result<Self, StructureError>
pub fn vertical_ellipse( span_m: f64, rise_m: f64, end_radius_m: f64, ) -> Result<Self, StructureError>
Admits a four-arc vertical ellipse of span span_m, rise rise_m and end radius
end_radius_m.
The two side arcs share one radius, derived from tangency. Rejects a rise at or below the span and an end radius at or above half the span. Also rejects as the box constructor does, and when a radius cubed, scaled by 64, overflows F64.
Sourcepub fn pipe_arch(
span_m: f64,
rise_m: f64,
corner_radius_m: f64,
bottom_radius_m: f64,
) -> Result<Self, StructureError>
pub fn pipe_arch( span_m: f64, rise_m: f64, corner_radius_m: f64, bottom_radius_m: f64, ) -> Result<Self, StructureError>
Admits a pipe-arch of span span_m, rise rise_m, corner radius corner_radius_m and
bottom radius bottom_radius_m.
The top radius is derived from tangency. Rejects a corner radius at or above half the span, a bottom radius at or below half the span, a rise at or below the corner-centre height plus the corner radius, and a rise above the corner centres of more than half the span, which would put the widest point on the top arc. Also rejects as the box constructor does, and when a radius cubed, scaled by 64, overflows F64.
Source§impl CulvertBarrel
impl CulvertBarrel
Sourcepub fn with_floor(self, floor: CulvertFloor) -> Result<Self, StructureError>
pub fn with_floor(self, floor: CulvertFloor) -> Result<Self, StructureError>
The barrel with floor, replacing any floor it had.
Stores the depth D - fl(D - h), which differs from h by at most half an F64 step of
D - h. Rejects a nonfinite or negative depth, a depth at or above the rise, which is a
closed barrel, and a zero depth on a barrel without a floor. Rejects a nonfinite or
nonpositive ratio, a ratio whose rho^(3/2) times the span leaves the F64 range, and an
open rise whose 2^-30 fraction is subnormal.
Sourcepub fn floor(&self) -> Option<CulvertFloor>
pub fn floor(&self) -> Option<CulvertFloor>
The declared floor, with its admitted depth.
Sourcepub fn base(&self) -> CulvertBarrel
pub fn base(&self) -> CulvertBarrel
The barrel without its floor.
Sourcepub fn open_rise_m(&self) -> f64
pub fn open_rise_m(&self) -> f64
Rise of the open section above the bed, D - h in metres. D without a floor.
Source§impl CulvertBarrel
impl CulvertBarrel
Sourcepub fn circular(diameter_m: f64) -> Result<Self, StructureError>
pub fn circular(diameter_m: f64) -> Result<Self, StructureError>
Admits a circular barrel of diameter diameter_m.
Rejects a nonfinite or nonpositive diameter, a diameter whose 2^-30 fraction is subnormal,
and a diameter whose cube, scaled by 64, overflows F64.
Sourcepub fn rectangular_box(span_m: f64, rise_m: f64) -> Result<Self, StructureError>
pub fn rectangular_box(span_m: f64, rise_m: f64) -> Result<Self, StructureError>
Admits a box barrel of span span_m and rise rise_m.
Rejects a nonfinite or nonpositive span or rise, a rise whose 2^-30 fraction is
subnormal, and dimensions whose B D, 2 (B + D) or B D^2, scaled by 64, overflow F64.
Sourcepub fn shape(&self) -> CulvertBarrelShape
pub fn shape(&self) -> CulvertBarrelShape
Barrel shape.
Sourcepub fn given_radius_m(&self) -> Option<&[f64]>
pub fn given_radius_m(&self) -> Option<&[f64]>
Radii the caller gave, in metres and constructor order.
A horizontal ellipse gives its side radius, a vertical ellipse its end radius, and a
pipe-arch its corner and bottom radius. None for a circle, a box and a flat-floor arch.
Trait Implementations§
Source§impl Clone for CulvertBarrel
impl Clone for CulvertBarrel
impl Copy for CulvertBarrel
Source§impl Debug for CulvertBarrel
impl Debug for CulvertBarrel
Source§impl PartialEq for CulvertBarrel
impl PartialEq for CulvertBarrel
impl StructuralPartialEq for CulvertBarrel
Auto Trait Implementations§
impl Forget for CulvertBarrel
impl Freeze for CulvertBarrel
impl Move for CulvertBarrel
impl RefUnwindSafe for CulvertBarrel
impl Send for CulvertBarrel
impl Sync for CulvertBarrel
impl Unpin for CulvertBarrel
impl UnsafeUnpin for CulvertBarrel
impl UnwindSafe for CulvertBarrel
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.