Commit 53788387 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix runtime error eigenvector() when no weights are used

This fixes ticket #84
parent 77ef683f
......@@ -36,7 +36,7 @@ long double eigenvector(GraphInterface& g, boost::any w, boost::any c,
throw ValueException("vertex property must be of floating point"
" value type");
typedef ConstantPropertyMap<int, GraphInterface::vertex_t> weight_map_t;
typedef ConstantPropertyMap<int, GraphInterface::edge_t> weight_map_t;
typedef mpl::push_back<writable_edge_scalar_properties, weight_map_t>::type
......@@ -49,7 +49,7 @@ long double eigenvector(GraphInterface& g, boost::any w, boost::any c,
_1, g.GetVertexIndex(), g.GetEdgeIndex(), _2,
_3, epsilon, max_iter, ref(eig)),
vertex_floating_properties())(w, c);
return eig;
......@@ -364,7 +364,7 @@ def eigenvector(g, weight=None, vprop=None, epsilon=1e-6, max_iter=None):
g : :class:`~graph_tool.Graph`
Graph to be used.
weights : :class:`~graph_tool.PropertyMap` (optional, default: ``None``)
weight : :class:`~graph_tool.PropertyMap` (optional, default: ``None``)
Edge property map with the edge weights.
vprop : :class:`~graph_tool.PropertyMap`, optional (default: ``None``)
Vertex property map where the values of eigenvector must be stored.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment