pub struct CutAndProjectCompiler { /* private fields */ }Expand description
Generalized cut-and-project compiler.
Implementations§
Source§impl CutAndProjectCompiler
impl CutAndProjectCompiler
Sourcepub fn new(source_dim: usize, target_dim: usize) -> Self
pub fn new(source_dim: usize, target_dim: usize) -> Self
Create a new compiler with identity-ish projection (will be overridden).
Sourcepub fn with_golden_projection(self) -> Self
pub fn with_golden_projection(self) -> Self
Standard Penrose P3 projection: 5D → 2D with golden-angle rotation.
Each source axis is rotated by k · 2π/5 in the target plane.
Sourcepub fn with_pca_projection(self, data: &[Vec<f64>]) -> Self
pub fn with_pca_projection(self, data: &[Vec<f64>]) -> Self
Learned PCA projection from data.
Performs a simple power-iteration PCA on the provided data to find
the top-target_dim principal components, then uses those as the
projection matrix.
Sourcepub fn compile(&self, lattice_range: i32) -> Vec<TileCoord>
pub fn compile(&self, lattice_range: i32) -> Vec<TileCoord>
Compile the tiling: scan a lattice cube, apply acceptance window, project accepted points.
Sourcepub fn verify_penrose(&self, tiles: &[TileCoord]) -> PenroseReport
pub fn verify_penrose(&self, tiles: &[TileCoord]) -> PenroseReport
Verify that the compiled tiling has Penrose-like properties.
Source§impl CutAndProjectCompiler
Public projection accessor on CutAndProjectCompiler.
impl CutAndProjectCompiler
Public projection accessor on CutAndProjectCompiler.
Sourcepub fn projection(&self) -> &Vec<Vec<f64>>
pub fn projection(&self) -> &Vec<Vec<f64>>
Get a reference to the projection matrix.
Auto Trait Implementations§
impl Freeze for CutAndProjectCompiler
impl !RefUnwindSafe for CutAndProjectCompiler
impl !Send for CutAndProjectCompiler
impl !Sync for CutAndProjectCompiler
impl Unpin for CutAndProjectCompiler
impl UnsafeUnpin for CutAndProjectCompiler
impl !UnwindSafe for CutAndProjectCompiler
Blanket Implementations§
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
Mutably borrows from an owned value. Read more