Struct demes::Graph

source · []
pub struct Graph { /* private fields */ }
Expand description

A resolved demes Graph.

Instances of this type will be fully-resolved according to the machine data model described here.

A graph cannot be directly initialized. See:

Implementations

The number of Deme instances in the graph.

Obtain a reference to a Deme by its name.

Returns

Some(&Deme) if name exists, None otherwise.

Examples

See here.

Get the Deme at index at.

Panics

Will panic if at is out of range.

Get the Deme instances via a slice.

Get the GenerationTime for the graph.

Get the TimeUnits for the graph.

Get the migration events for the graph.

Get the pulse events for the graph.

Get a copy of the top-level Metadata.

Convert the time units to generations.

Errors

If the time unit of an event differs sufficiently in magnitude from the generation_time, it is possible that conversion results in epochs (or migration durations) of length zero, which will return an error.

If any field is unresolved, an error will be returned.

Convert the time units to generations, rounding the output to an integer value.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

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.