bipartite

package
v0.0.0-...-8859e38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

bipartite either finds a bipartition or an odd-length cycle of an undirected graph

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bag

type Bag struct {
	// contains filtered or unexported fields
}

func (*Bag) Add

func (b *Bag) Add(v int)

type Bipartite

type Bipartite struct {
	// contains filtered or unexported fields
}

func NewBipartite

func NewBipartite(g *graph.Graph) *Bipartite

func (*Bipartite) Color

func (bp *Bipartite) Color(v int) bool

func (*Bipartite) HasOddCycle

func (bp *Bipartite) HasOddCycle() bool

func (*Bipartite) IsBipartite

func (bp *Bipartite) IsBipartite() bool

func (*Bipartite) OddCycle

func (bp *Bipartite) OddCycle() []int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL