graph

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package graph provides types and functions for generic knowledge representation, including items,messages, events, and statements about these in an RDF-like fashion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGraph

func CreateGraph() *graph

Types

type Collection

type Collection interface {
	Iterator() Iterator
	First() Step
	Size() uint64
	AsSlice() []Step
	SourceGraph() Graph
}

type Graph

type Graph interface {
	ROGraph
	Concept(Step) Step
	Assert(Step, Step, v.Value) Step
}

type Identifier

type Identifier = v.Identifier

type Iterator

type Iterator interface {
	Next() bool
	Value() Step
}

An Iterator allows iterating over query results, like this: `it := graph.Query(...).Iterator()

for it.Next() { s := it.Value(); ... }`

func SliceIterator

func SliceIterator(data []Step) Iterator

type ROGraph

type ROGraph interface {
	Content() Collection
	Last() Step
	Size() uint64
	Query(Step, Step, v.Value) Collection
	Get(string, Step) Step
	Ref(Step) string
	Concepts() Collection
}

type Step

type Step interface {
	StepCore
	v.Value
}

interface Step, type step: a semantic (RDF-like) triple, representing a statment of the form <subject>, <predicate>, <object>.

func MakeStep added in v0.1.12

func MakeStep(cs StepCore) Step

type StepCore added in v0.1.12

type StepCore interface {
	Item() Step
	Property() Step
	Value() v.Value
	Id() Identifier
	Graph() Graph
}

Directories

Path Synopsis
Package context defines a graph context that handles the environment during graph processing, e.g.
Package context defines a graph context that handles the environment during graph processing, e.g.
Package talk provides external interfaces for graphs.
Package talk provides external interfaces for graphs.

Jump to

Keyboard shortcuts

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