Struct pnets::Marking[][src]

pub struct Marking<T: Ord + Copy> { /* fields omitted */ }
Expand description

Hollow usize vector sorted with generic indices

Allow manipulation of big vector which contains a lot of zeroes. This type of vector is very useful to represent the connection between locations and transitions in order to avoid creating a matrix mainly filled with zeros.

Implementations

Return a iterator over all present elements in the marking

Return an iterator over two marking at same time. Useful to compare marking with a complexity of O(2n) instead of O(2nln(n))

Remove all items in marking

Returns the number of elements in the marking.

Returns true if the vector contains no elements.

Increment the value contained in the marking by weight.

If the tag does not contain a value associated with the index, weight is inserted into the index.

Keeps the minimum value between that contained in the marking and weight.

If the tag does not contain a value associated with the index, weight is inserted into the index.

Keeps the maximum value between that contained in the marking and weight.

If the tag does not contain a value associated with the index, weight is inserted into the index.

Delete a specific index from the marking

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.