Skip to main content

StaticTopTreeDataBuilder

Struct StaticTopTreeDataBuilder 

Source
struct StaticTopTreeDataBuilder<C>
where C: Cluster,
{ compressed: Vec<MaybeUninit<InnerValue<<C as Cluster>::Path>>>, raked: Vec<MaybeUninit<InnerValue<<C as Cluster>::Point>>>, light_points: Vec<<C as Cluster>::Point>, }

Fields§

§compressed: Vec<MaybeUninit<InnerValue<<C as Cluster>::Path>>>§raked: Vec<MaybeUninit<InnerValue<<C as Cluster>::Point>>>§light_points: Vec<<C as Cluster>::Point>

Implementations§

Source§

impl<C> StaticTopTreeDataBuilder<C>
where C: Cluster,

Source

fn new(tree: &StaticTopTree) -> Self

Examples found in repository?
crates/competitive/src/tree/static_top_tree.rs (line 558)
550    pub fn new(
551        tree: &'a StaticTopTree,
552        vertices: Vec<<C as Cluster>::Vertex>,
553        edges: Vec<<C as Cluster>::Edge>,
554    ) -> Self {
555        assert_eq!(vertices.len(), tree.vertices_size());
556        assert_eq!(edges.len(), tree.edges_size());
557
558        let mut data: StaticTopTreeDataBuilder<C> = StaticTopTreeDataBuilder::new(tree);
559        let path = tree.init_compress(
560            &mut data,
561            &vertices,
562            &edges,
563            tree.compress_roots[tree.root].expect("root compress tree must exist"),
564        );
565        let all_point = C::add_edge(&path);
566        Self {
567            tree,
568            vertices,
569            edges,
570            compressed: unsafe { assume_init_vec(data.compressed) },
571            raked: unsafe { assume_init_vec(data.raked) },
572            light_points: data.light_points,
573            all_point,
574        }
575    }

Auto Trait Implementations§

§

impl<C> Freeze for StaticTopTreeDataBuilder<C>

§

impl<C> RefUnwindSafe for StaticTopTreeDataBuilder<C>

§

impl<C> Send for StaticTopTreeDataBuilder<C>

§

impl<C> Sync for StaticTopTreeDataBuilder<C>

§

impl<C> Unpin for StaticTopTreeDataBuilder<C>

§

impl<C> UnsafeUnpin for StaticTopTreeDataBuilder<C>

§

impl<C> UnwindSafe for StaticTopTreeDataBuilder<C>

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> ToArrayVecScalar for T

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.