edge

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(edges api.Edges) int

Count returns the amount of edges in the provided list.

This function does not consider implicit edges based on duplicates.

Types

type FrequencyDistributionEntry

type FrequencyDistributionEntry struct {
	RuleID     string  `json:"value"`
	Frequency  int     `json:"frequency"`
	Percentage float64 `json:"percentage"`
}

FrequencyDistributionEntry represents a single row of a frequency distribution table.

func FrequencyDistribution

func FrequencyDistribution(edges api.Edges, top int, sortASC bool) []*FrequencyDistributionEntry

FrequencyDistribution returns how often a rule is present.

By default, the results are ordered with the highest percentage first, but it can be changed using the 'sortASC' option.

Using the 'top' option it is possible to limit the results to only the n highest or lowest results.

This function does not consider implicit rule usages based on duplicates.

type MatrixEntry

type MatrixEntry struct {
	A     string          `json:"a"`
	B     string          `json:"b"`
	Links map[string]bool `json:"links"`
}

MatrixEntry represents a single entry for an edge and duplicate matrix.

func Matrix

func Matrix(edges api.Edges, duplicates api.Duplicates, links []string) []MatrixEntry

Matrix returns a matrix in which it is possible to see the links between each two records and due to which rule or duplicate they are linked.

Jump to

Keyboard shortcuts

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