pub struct PreparedMatrix4<'a> { /* private fields */ }Expand description
Prepared handle for repeated use of a borrowed Matrix4.
The 4x4 handle mirrors PreparedMatrix3 and is aimed at transform stacks,
projective geometry, and solver blocks that reuse one matrix across many
exact operations. Cached structural facts stay at the matrix layer while
scalar numerator/denominator storage remains owned by hyperreal.
Implementations§
Source§impl<'a> PreparedMatrix4<'a>
impl<'a> PreparedMatrix4<'a>
Sourcepub fn structural_facts(&self) -> Matrix4StructuralFacts
pub fn structural_facts(&self) -> Matrix4StructuralFacts
Returns cached structural facts for the prepared matrix.
These facts include homogeneous affine and direction shortcuts, so transform-heavy callers can select exact fast paths from one retained object summary. This is the 4x4 version of Yap’s exact-geometric preprocessing boundary.
Sourcepub fn exact_facts(&self) -> ExactRealSetFacts
pub fn exact_facts(&self) -> ExactRealSetFacts
Returns cached exact-rational set facts for all entries.
Sourcepub fn determinant_schedule_hint(&self) -> MatrixDeterminantScheduleHint
pub fn determinant_schedule_hint(&self) -> MatrixDeterminantScheduleHint
Returns the retained determinant schedule hint for this prepared matrix.
Sourcepub fn cache_state(&self) -> MatrixPreparedCacheState
pub fn cache_state(&self) -> MatrixPreparedCacheState
Return which determinant/factor/adjugate caches are warm on this prepared matrix.
Sourcepub fn determinant(&mut self) -> Real
pub fn determinant(&mut self) -> Real
Returns the determinant using the prepared determinant/factor cache.
For 4x4 matrices this may reuse the same fixed minor factors used by the prepared adjugate path, keeping determinant, inverse, and right-division workloads on one cached object boundary as recommended by Yap, “Towards Exact Geometric Computation,” Computational Geometry 7.1-2 (1997).
Sourcepub fn right_divisor(&mut self) -> &mut PreparedRightDivisor4<'a>
pub fn right_divisor(&mut self) -> &mut PreparedRightDivisor4<'a>
Returns a mutable prepared right-divisor view of the same matrix.
Sourcepub fn transform_vec4_handle(&self) -> TransformedMatrix4<'a>
pub fn transform_vec4_handle(&self) -> TransformedMatrix4<'a>
Returns a retained transform handle using this prepared matrix’s cached structural facts.
Reusing the same prepared object for matrix-vector transforms, determinant queries, inverse construction, and right division keeps affine/homogeneous facts in one semantic cache. The arithmetic kernels remain owned by the retained transform handle; this method only prevents repeated structural rediscovery, following Yap’s object-package model in “Towards Exact Geometric Computation,” Computational Geometry 7.1-2 (1997).
Sourcepub fn transform_vector(&self, rhs: &Vector4) -> Vector4
pub fn transform_vector(&self, rhs: &Vector4) -> Vector4
Transforms one 4D homogeneous vector using cached prepared-matrix facts.
Sourcepub fn transform_vector_batch(&self, rhs: &[Vector4]) -> Vec<Vector4>
pub fn transform_vector_batch(&self, rhs: &[Vector4]) -> Vec<Vector4>
Transforms a batch of 4D homogeneous vectors using cached prepared-matrix facts.
Sourcepub fn transform_direction_vector(&self, rhs: &Vector4) -> Vector4
pub fn transform_direction_vector(&self, rhs: &Vector4) -> Vector4
Transforms one caller-certified homogeneous direction (w = 0) using
cached prepared-matrix facts.
Sourcepub fn transform_direction_batch(&self, rhs: &[Vector4]) -> Vec<Vector4>
pub fn transform_direction_batch(&self, rhs: &[Vector4]) -> Vec<Vector4>
Transforms a batch of caller-certified homogeneous directions (w = 0)
using cached prepared-matrix facts.
Sourcepub fn transform_point_vector(&self, rhs: &Vector4) -> Vector4
pub fn transform_point_vector(&self, rhs: &Vector4) -> Vector4
Transforms one caller-certified homogeneous point (w = 1) using cached
prepared-matrix facts.
Sourcepub fn transform_point_batch(&self, rhs: &[Vector4]) -> Vec<Vector4>
pub fn transform_point_batch(&self, rhs: &[Vector4]) -> Vec<Vector4>
Transforms a batch of caller-certified homogeneous points (w = 1) using
cached prepared-matrix facts.
Sourcepub fn inverse(&mut self) -> BlasResult<Matrix4>
pub fn inverse(&mut self) -> BlasResult<Matrix4>
Returns the inverse using the prepared determinant/adjugate cache.
Sourcepub fn inverse_checked(&mut self) -> CheckedBlasResult<Matrix4>
pub fn inverse_checked(&mut self) -> CheckedBlasResult<Matrix4>
Checked inverse using the prepared determinant/adjugate cache.
Sourcepub fn inverse_checked_with_abort(
&mut self,
signal: &AbortSignal,
) -> CheckedBlasResult<Matrix4>
pub fn inverse_checked_with_abort( &mut self, signal: &AbortSignal, ) -> CheckedBlasResult<Matrix4>
Abort-aware checked inverse using the prepared determinant/adjugate cache.
Sourcepub fn reciprocal(&mut self) -> BlasResult<Matrix4>
pub fn reciprocal(&mut self) -> BlasResult<Matrix4>
Reciprocal matrix using the prepared inverse cache.
Sourcepub fn reciprocal_checked(&mut self) -> CheckedBlasResult<Matrix4>
pub fn reciprocal_checked(&mut self) -> CheckedBlasResult<Matrix4>
Checked reciprocal matrix using the prepared inverse cache.
Sourcepub fn reciprocal_checked_with_abort(
&mut self,
signal: &AbortSignal,
) -> CheckedBlasResult<Matrix4>
pub fn reciprocal_checked_with_abort( &mut self, signal: &AbortSignal, ) -> CheckedBlasResult<Matrix4>
Abort-aware checked reciprocal matrix using the prepared inverse cache.
Sourcepub fn divide_left(&mut self, left: Matrix4) -> BlasResult<Matrix4>
pub fn divide_left(&mut self, left: Matrix4) -> BlasResult<Matrix4>
Divides left by the prepared matrix.
Sourcepub fn divide_exact_rational_left(
&mut self,
left: Matrix4,
) -> BlasResult<Matrix4>
pub fn divide_exact_rational_left( &mut self, left: Matrix4, ) -> BlasResult<Matrix4>
Divides a caller-certified exact-rational left by the prepared matrix.
This retains the existing exact-rational-left optimization exposed by
Matrix4::div_exact_rational_matrix_with_prepared while placing it on
the broader prepared-matrix handle.
Sourcepub fn divide_left_checked(
&mut self,
left: Matrix4,
) -> CheckedBlasResult<Matrix4>
pub fn divide_left_checked( &mut self, left: Matrix4, ) -> CheckedBlasResult<Matrix4>
Checked right-division of left by the prepared matrix.
Sourcepub fn divide_left_checked_with_abort(
&mut self,
left: Matrix4,
signal: &AbortSignal,
) -> CheckedBlasResult<Matrix4>
pub fn divide_left_checked_with_abort( &mut self, left: Matrix4, signal: &AbortSignal, ) -> CheckedBlasResult<Matrix4>
Abort-aware checked right-division of left by the prepared matrix.
Trait Implementations§
Source§impl<'a> Clone for PreparedMatrix4<'a>
impl<'a> Clone for PreparedMatrix4<'a>
Source§fn clone(&self) -> PreparedMatrix4<'a>
fn clone(&self) -> PreparedMatrix4<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more