English
Languages
English
Bengali
Japanese
Spanish



Clique

class Clique(graph, size=None)[source]

Bases: GraphOptimizationApplication

Optimization application for the “clique” [1] problem based on a NetworkX graph.

References

[1]: “Clique (graph theory)”, https://en.wikipedia.org/wiki/Clique_(graph_theory)

Parameters:
  • graph (Union[Graph, ndarray, List]) – A graph representing a problem. It can be specified directly as a NetworkX graph, or as an array or list format suitable to build out a NetworkX graph.

  • size (Optional[int]) – The size of the clique. When it’s None, the default, this class makes an optimization model for a maximal clique instead of the specified size of a clique.

Attributes

size

Getter of size

Methods

interpret(result)

Interpret a result as a list of node indices

to_quadratic_program()

Convert a clique problem instance into a QuadraticProgram.