dtos

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllSubPPSDTO

type AllSubPPSDTO struct {
	Graph           graph.Graph[string, string]
	Source          string
	Target          string
	MinNestingLevel int
}

type BenchMark

type BenchMark struct {
	NumEdge         int64   `json:"n_edge"`
	CompressionRate float64 `json:"compressionRate"`
	Time            float64 `json:"time"`
}

type DataChildDTO

type DataChildDTO struct {
	Data  KeyDTO         `json:"data,omitempty"`
	Child []DataChildDTO `json:"child,omitempty"`
	Tag   TrustType
}

func (DataChildDTO) GenerateDotD

func (node DataChildDTO) GenerateDotD(nodeID int) (string, int)

NEW

type DataChildExpressionDTO

type DataChildExpressionDTO struct {
	Data  ExpressionDTO            `json:"data,omitempty"`
	Child []DataChildExpressionDTO `json:"child,omitempty"`
}

func (DataChildExpressionDTO) GenerateDot

func (node DataChildExpressionDTO) GenerateDot(nodeID int) (string, int)

NEW

type EdgeDTO

type EdgeDTO struct {
	FromNode string `json:"fromNode,omitempty"`
	ToNode   string `json:"toNode,omitempty"`
}

type ExpressionDTO

type ExpressionDTO struct {
	Operation string `json:"operation,omitempty"`
	FromNode  string `json:"fromNode,omitempty"`
	ToNode    string `json:"toNode,omitempty"`
}

type FromTo

type FromTo struct {
	FromNode string `json:"fromNode,omitempty"`
	ToNode   string `json:"toNode,omitempty"`
}

type InputEvaluatorDTO

type InputEvaluatorDTO struct {
	OpinionMode string       `json:"opinionMode"`
	Expression  DataChildDTO `json:"expression"`
}

type KeyDTO

type KeyDTO struct {
	Operation string          `json:"operation,omitempty"`
	FromNode  string          `json:"fromNode,omitempty"`
	ToNode    string          `json:"toNode,omitempty"`
	Opinion   OpinionDTOValue `json:"opinion,omitempty"`
}

type NodesEdges

type NodesEdges struct {
	NumNodes int
	NumEdges int
}

type OpinionDTO

type OpinionDTO struct {
	Value    OpinionDTOValue
	FromNode string `csv:"fromNode" json:"fromNode,omitempty"`
	ToNode   string `csv:"toNode" json:"toNode,omitempty"`
}

func (OpinionDTO) Destination

func (o OpinionDTO) Destination() string

Implements interface TrustRelationship from trustmodelstructure Destination() returns ToNode from OpinionDTO

func (OpinionDTO) Opinion

Implements interface TrustRelationship from trustmodelstructure Opinion() returns Value from OpinionDTO

func (OpinionDTO) Source

func (o OpinionDTO) Source() string

Implements interface TrustRelationship from trustmodelstructure Source() returns FromNode from OpinionDTO

type OpinionDTOFlatten

type OpinionDTOFlatten struct {
	Belief      float64 `csv:"belief" json:"belief"`
	Disbelief   float64 `csv:"disbelief" json:"disbelief"`
	Uncertainty float64 `csv:"uncertainty" json:"uncertainty"`
	BaseRate    float64 `csv:"baseRate" json:"baseRate"`
	FromNode    string  `csv:"fromNode" json:"fromNode,omitempty"`
	ToNode      string  `csv:"toNode" json:"toNode,omitempty"`
}

type OpinionDTOValue

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

func NewOpinionDTOValue

func NewOpinionDTOValue(belief float64, disbelief float64, uncertainty float64, baseRate float64) OpinionDTOValue

func (OpinionDTOValue) BaseRate

func (o OpinionDTOValue) BaseRate() float64

Implements interface QueryableOpinion from subjectivelogic GetBaseRate() returns BaseRate from OpinionDTOValue

func (OpinionDTOValue) Belief

func (o OpinionDTOValue) Belief() float64

Implements interface QueryableOpinion from subjectivelogic GetBelief() returns Belief from OpinionDTOValue

func (OpinionDTOValue) Disbelief

func (o OpinionDTOValue) Disbelief() float64

Implements interface QueryableOpinion from subjectivelogic GetDisbelief() returns Disbelief from OpinionDTOValue

func (OpinionDTOValue) ProjectedProbability

func (o OpinionDTOValue) ProjectedProbability() float64

func (OpinionDTOValue) String

func (o OpinionDTOValue) String() string

func (OpinionDTOValue) Uncertainty

func (o OpinionDTOValue) Uncertainty() float64

Implements interface QueryableOpinion from subjectivelogic GetUncertainty() returns Uncertainty from OpinionDTOValue

type ProcessingPath

type ProcessingPath struct {
	Edges     []EdgeDTO
	Nodes     []string
	NodeToPPS map[string]EdgeDTO
	Index     int
}

type ScopeVertexEdgeDTO

type ScopeVertexEdgeDTO struct {
	Node  string   `json:"node"`
	Links []string `json:"links"`
	Scope string   `json:"scope"`
}

type StructureGraphTAFMultipleProp

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

func StructureGraphTAFMultiplePropConstr

func StructureGraphTAFMultiplePropConstr(fusionOperator trustmodelstructure.FusionOperator, discountOperator trustmodelstructure.DiscountOperator, adjacencyList []trustmodelstructure.AdjacencyListEntry) StructureGraphTAFMultipleProp

StructureGraphTAFMultiplePropConstr is a constructor function for StructureGraphTAFMultipleProp.

func (StructureGraphTAFMultipleProp) AdjacencyList

Implements interface TrustGraphStructure from trustmodelstructure AdjacencyList returns the adjacency list of the StructureGraphTAFMultipleProp. func (t StructureGraphTAFMultipleProp) AdjacencyList() []AdjacencyListEntry {

func (StructureGraphTAFMultipleProp) DiscountOperator

Implements interface TrustGraphStructure from trustmodelstructure DiscountOperator returns the discount operator of the StructureGraphTAFMultipleProp.

func (StructureGraphTAFMultipleProp) Operator

Implements interface TrustGraphStructure from trustmodelstructure Operator returns the fusion operator of the StructureGraphTAFMultipleProp.

type StructureGraphTAFSingleProp

type StructureGraphTAFSingleProp struct {
	AdjacencyList []VertexEdgeDTO //AdjacencyList is a slice of `VertexEdgeDTO` structs.
	Scope         string          // target variable
}

type SynthesizingGraph

type SynthesizingGraph struct {
	Adj       map[string]map[string]graph.Edge[string]
	Edges     []EdgeDTO
	Nodes     []string
	NodeToPPS map[string]EdgeDTO
}

type TrustType

type TrustType int
const (
	ReferralTrust TrustType = iota
	FunctionalTrust
)

Define the enum values using iota

type VertexEdgeDTO

type VertexEdgeDTO struct {
	Node  string   `json:"node"`
	Links []string `json:"links"`
}

func (VertexEdgeDTO) SourceNode

func (v VertexEdgeDTO) SourceNode() string

Implements interface AdjacencyListEntry from trustmodelstructure SourceNode returns the source node of the VertexEdgeDTO.

func (VertexEdgeDTO) TargetNodes

func (v VertexEdgeDTO) TargetNodes() []string

Implements interface AdjacencyListEntry from trustmodelstructure TargetNodes returns the target nodes of the VertexEdgeDTO.

type VertexPropertiesDTO

type VertexPropertiesDTO struct {
	InFlow  float64
	OutFlow float64
}

Jump to

Keyboard shortcuts

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