#NEWLINE# def complete_graph( shape , graph_cls = PointUndirectedGraph ) : #NEWLINE# #INDENT# '\n    Returns a complete graph given the landmarks configuration of a shape\n    instance.\n\n    Parameters\n    ----------\n    shape : :map:`PointCloud` or :map:`LandmarkGroup` or subclass\n        The shape instance that defines the landmarks configuration based on\n        which the graph will be created.\n    graph_cls : `Graph` or `PointGraph` subclass\n        The output graph type.\n        Possible options are ::\n\n            {:map:`UndirectedGraph`, :map:`DirectedGraph`,\n             :map:`PointUndirectedGraph`, :map:`PointDirectedGraph`}\n\n    Returns\n    -------\n    graph : `Graph` or `PointGraph` subclass\n        The generated graph.\n\n    Raises\n    ------\n    ValueError\n        graph_cls must be UndirectedGraph, DirectedGraph, PointUndirectedGraph\n        or PointDirectedGraph.\n    ' #NEWLINE# ( points , n_vertices ) = _get_points_and_number_of_vertices ( shape ) #NEWLINE# edges = _get_complete_graph_edges ( range ( n_vertices ) ) #NEWLINE# if ( ( graph_cls == UndirectedGraph ) or ( graph_cls == DirectedGraph ) ) : #NEWLINE# #INDENT# return graph_cls . init_from_edges ( edges = edges , n_vertices = n_vertices , skip_checks = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( graph_cls == PointUndirectedGraph ) or ( graph_cls == PointDirectedGraph ) ) : #NEWLINE# #INDENT# return graph_cls . init_from_edges ( points = points , edges = edges , skip_checks = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'graph_cls must be UndirectedGraph, DirectedGraph, PointUndirectedGraph or PointDirectedGraph.' )