Skip to content

Results are limited to Maximum Independent Set v0.1.9

Product news
You are reading Maximum Independent Set v0.1.9, an older version of this documentation. Go to the latest version (v0.3.2)

mis.shared.types

module
mis.shared.types

Classes

enum
MethodType ()

Bases : str, Enum

Attributes

  • EAGER

  • GREEDY

class
MISInstance (graph: networkx.Graph)

Methods

  • draw — Draw instance graph with highlighted nodes.

method
draw (nodes: list[int] | None = None, node_size: int = 600, highlight_color: str = 'darkgreen', font_family: str = 'serif') → None

Draw instance graph with highlighted nodes.

Parameters

  • ```

  • nodes : list[int] — List of nodes to highlight.

  • node_size : int — Size of drawn nodes in drawn graph. (default: 600)

  • highlight_color : str — Color to highlight nodes with. (default: "darkgreen")

  • ```

Raises

  • Exception

class
MISSolution (instance: MISInstance, nodes: list[int], frequency: float)

A solution to a MIS problem.

Attributes

  • instance : MISInstance — The MIS instance to which this class represents a solution.

  • size : int — The number of nodes in this solution.

  • node_indices : list[int] — The indices of the nodes of instance picked in this solution.

  • nodes : list[Any] — The nodes of instance picked in this solution.

  • frequency : float — How often this solution showed up in the measures, where 0. represents a solution that never showed up in the meaures and 1. a solution that showed up in all measures.

Methods

  • draw — Draw instance graph with solution nodes highlighted.

method
draw (node_size: int = 600, highlight_color: str = 'darkgreen', font_family: str = 'serif') → None

Draw instance graph with solution nodes highlighted.

Parameters

  • ```

  • node_size : int — Size of drawn nodes in drawn graph. (default: 600)

  • highlight_color : str — Color to highlight solution nodes with. (default: "darkgreen")

  • font : str — Font type

  • ```