From b18c4bbf8b0f1abbc06d76677a1c53a7c05e9d69 Mon Sep 17 00:00:00 2001 From: Miles Lubin Date: Sun, 21 Dec 2014 16:23:01 -0500 Subject: [PATCH] special case for ProvidedVertexType --- src/common.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.jl b/src/common.jl index cd3b0df4..85e7948f 100644 --- a/src/common.jl +++ b/src/common.jl @@ -29,9 +29,9 @@ make_vertex(g::AbstractGraph{ExVertex}, label::String) = ExVertex(num_vertices(g vertex_index(v::ExVertex) = v.index attributes(v::ExVertex, g::AbstractGraph) = v.attributes -typealias ProvidedVertexType Union(Integer, KeyVertex, ExVertex) +typealias ProvidedVertexType Union(KeyVertex, ExVertex) -# vertex_index for (V !<: ProvidedVertexType) +vertex_index{V<:ProvidedVertexType}(v::V, g::AbstractGraph{V}) = vertex_index(v) function vertex_index{V}(v::V, g::AbstractGraph{V}) @graph_requires g vertex_list