made RAG public and hyperlinked networkx.Graph documentation

This commit is contained in:
Vighnesh Birodkar
2014-07-03 01:55:09 +05:30
parent a4bf278c5b
commit fb706d12d5
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
from .spath import shortest_path
from .mcp import MCP, MCP_Geometric, MCP_Connect, MCP_Flexible, route_through_array
from .rag import rag_mean_color
from .rag import rag_mean_color, RAG
from .graph_cut import cut_threshold
__all__ = ['shortest_path',
@@ -10,4 +10,5 @@ __all__ = ['shortest_path',
'MCP_Flexible',
'route_through_array',
'rag_mean_color',
'cut_threshold']
'cut_threshold',
'RAG']
+2 -1
View File
@@ -37,7 +37,8 @@ def min_weight(graph, src, dst, n):
class RAG(nx.Graph):
"""
The Region Adjacency Graph (RAG) of an image.
The Region Adjacency Graph (RAG) of an image, subclasses
`networx.Graph <http://networkx.github.io/documentation/latest/reference/classes.graph.html>`_
"""
def merge_nodes(self, src, dst, weight_func=min_weight, extra_arguments=[],