Module fera_graph::props [] [src]

Traits and implementation for properties (key to values mapping).

Examples

use fera_graph::prelude::*;

let g = CompleteGraph::new(4);
let mut p = g.default_vertex_prop(0i32);
p[3] = -3;
assert_eq!(0, p.get(0));
assert_eq!(-3, p.get(3));
let abs_p = p.map(i32::abs);
assert_eq!(3, abs_p.get(3));

Structs

ArrayProp

A property backed by an array.

DelegateEdgeProp

An edge property that delegates all operations to a wrapped property.

DelegateVertexProp

A vertex property that delegates all operations to a wrapped property.

FnProp

A read only property backed by a function.

HashMapProp

A property backed by a HashMap.

IgnoreWriteProp

A property that ignore writes.

Map

A property that maps the value of a wrapped property with a function.

Enums

Color

Indicates the status of an item in a traverse algorithm.

Traits

BasicEdgeProps
BasicProps
BasicVertexProps
EdgeProp

An edge property that can be read using indexing operation.

EdgePropGet

A edge property.

EdgePropMut

A edge property that can be read/write using indexing operation.

EdgePropMutNew

An edge property that can be read/write using indexing operation.

PropGet

An abstract property that maps keys in domain K to the corresponding values.

PropIndexMut

A property that can be read/write using indexing operations.

VertexProp

A vertex property that can be read using indexing operation.

VertexPropGet

A vertex property.

VertexPropMut

A vertex property that can be read/write using indexing operation.

VertexPropMutNew

A vertex property that can be created using a graph reference and a value.

WithEdgeIndexProp

A graph that has a property that maps each edge to an integer in the range 0..num_edges.

WithEdgeProp

A graph that has a default edge property type, that is, has a default implementation to associated values with edges.

WithVertexIndexProp

A graph that has a property that maps each vertex to an integer in the range 0..num_vertices.

WithVertexProp

A graph that has a default vertex property type, that is, has a default implementation to associated values with vertices.

Type Definitions

VecEdgeProp

A edge property backed by a Vec.

VecVertexProp

A vertex property backed by a Vec.