generator

package
v0.0.0-...-67c439a Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: Unlicense Imports: 16 Imported by: 0

Documentation

Overview

Package generator implements mlsic.Graph but instead of using GNNs for graph generation, it uses deterministic algos. It exists mostly as a developer's tool to help seed the process of writing Algo1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Det

type Det struct {
	// TotalGraphs total numbers of graphs to be generated.
	TotalGraphs int
	// Print if true renders all graphs generated as .dot and subsequently .svg files.
	Print bool
	// Seed of the rand.Seed() function.
	Seed int64
	// MaxNodes is the maximum number of nodes allowed per graph.
	MaxNodes int
	// MaxEdges is the maximum number of edges a node can have.
	MaxEdges int
	// MaxWeight is the maximum number an edge can be assigned.
	MaxWeight int
}

Det implements mlsic.Graph. It is a deterministic graph generator meant to be used for developing Algo1.

func (*Det) Dump

func (d *Det) Dump() ([]*simple.WeightedUndirectedGraph, error)

Dump returns a deterministic sequence of graphs for dev purposes.

type Prime1

type Prime1 struct {
	// TotalGraphs total numbers of graphs to be generated.
	TotalGraphs int
	// Print if true renders all graphs generated as .dot and subsequently .svg files.
	Print bool
}

Prime1 implements mlsic.Graph. If it a deterministic graph generator that starts from a asimple graph with few nodes and scales up nodes for the next graph following primes numbers.

func (*Prime1) Dump

func (p *Prime1) Dump() ([]*simple.WeightedUndirectedGraph, error)

Dump returns a deterministic sequence of graphs for dev purposes.

Jump to

Keyboard shortcuts

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