Aardvark.Base


DenseGraph<'TVertex, 'TCost>

Constructors

ConstructorDescription
new(nodes, weightFun)
Signature: (nodes:IEnumerable<'TVertex> * weightFun:Func<'TVertex,'TVertex,'TCost>) -> unit
new(nodes, weightFun)
Signature: (nodes:IEnumerable<'TVertex> * weightFun:Func<int,'TVertex,int,'TVertex,'TCost>) -> unit

Instance members

Instance memberDescription
BuildMinimumSpanningTreePrim()
Signature: unit -> Tree<'TVertex,'TCost>

Builds the minimum-spanning-tree using Prim's algorithm in O(|V|^2) where |V| is the number of vertices (nodes) in the Graph

BuildWeights(weightFun)
Signature: weightFun:Func<'TVertex,'TVertex,'TCost> -> unit
BuildWeights(weightFun)
Signature: weightFun:Func<int,'TVertex,int,'TVertex,'TCost> -> unit
EdgeCount
Signature: int
Modifiers: abstract
Edges
Signature: IEnumerable<Edge<'TVertex,'TCost>>
Modifiers: abstract
GetCost(n0, n1)
Signature: (n0:int * n1:int) -> 'TCost
Modifiers: abstract
MinimumSpanningTree
Signature: Tree<'TVertex,'TCost>
Modifiers: abstract

Returns the minimum-spanning-tree for the Graph If no Tree has been built before builds it using Prim's algorithm (which is faster than Kruskal's algorithm on dense Graphs)

SolveTSP()
Signature: unit -> Tour<'TVertex,'TCost>
Fork me on GitHub