Skip to main content

Atlas

Struct Atlas 

Source
pub struct Atlas { /* private fields */ }
Expand description

Atlas: previously decoded patches, ranked lookup by signature.

Implementations§

Source§

impl Atlas

Source

pub fn new() -> Self

Empty atlas at the header capacity.

Source

pub fn insert(&mut self, tile: &Tile)

Insert a decoded tile (encoder-side bookkeeping).

Source

pub fn insert_with_sig(&mut self, tile: &Tile, sig: Sig)

Insert with a precomputed signature (review fix 5: callers that already computed sig for ranking should not pay for it twice).

Source

pub fn rank_by_sig(&self, sig: &Sig, w: u32, h: u32, top: usize) -> Vec<u32>

Rank candidate patch indices by structural signature distance (v0.6 P1: gradient/variance/luma, not mean-RGB-only). Only identically shaped patches within the last ATLAS_CAPACITY (README: “last 128”) are eligible. Returns at most top indices, best first — encoder re-scores each candidate by actual proxy cost anyway.

Trait Implementations§

Source§

impl Default for Atlas

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Atlas

§

impl RefUnwindSafe for Atlas

§

impl Send for Atlas

§

impl Sync for Atlas

§

impl Unpin for Atlas

§

impl UnsafeUnpin for Atlas

§

impl UnwindSafe for Atlas

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.