ml4co_kit.task.graph.mcl

Maximum Clique (MCl).

MCl is to find the largest complete subgraph in an undirected graph, where every pair of vertices in the subgraph is connected by an edge.

Classes

MClTask(node_weighted, precision)

class ml4co_kit.task.graph.mcl.MClTask(node_weighted: bool = False, precision: ~numpy.float32 | ~numpy.float64 = <class 'numpy.float32'>)[source]

Bases: GraphTaskBase

check_constraints(sol: ndarray) bool[source]

Check if the solution is valid.

evaluate(sol: ndarray, check_constr: bool = True) floating[source]

Evaluate the given solution. To be implemented by subclasses.

render(save_path: Path, with_sol: bool = True, figsize: tuple = (5, 5), pos_type: str = 'kamada_kawai_layout', node_color: str = 'darkblue', sol_node_color: str = 'orange', node_size: int = 20, edge_color: str = 'darkblue', edge_alpha: float = 0.5, edge_width: float = 1.0)[source]

Render the MCl problem instance with or without solution.