FactEdge class

An edge connecting two nodes in the fact graph.

Constructors

FactEdge({required String id, required EdgeType type, required String sourceId, required String targetId, String? label, double? weight, double? confidence, bool bidirectional = false, Map<String, dynamic>? properties, Map<String, dynamic>? metadata})
FactEdge.fromJson(Map<String, dynamic> json)
Create from JSON.
factory

Properties

bidirectional bool
Whether the relationship is bidirectional.
final
confidence double?
Confidence score in this relationship (0.0 to 1.0).
final
hashCode int
The hash code for this object.
no setteroverride
id String
Unique edge identifier.
final
label String?
Human-readable label.
final
metadata Map<String, dynamic>
Additional metadata.
final
properties Map<String, dynamic>
Edge properties.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceId String
Source node ID.
final
targetId String
Target node ID.
final
type EdgeType
Edge type/relationship.
final
weight double?
Edge weight/strength (0.0 to 1.0).
final

Methods

connectsTo(String nodeId) bool
Check if this edge connects to a specific node.
copyWith({String? id, EdgeType? type, String? sourceId, String? targetId, String? label, double? weight, double? confidence, bool? bidirectional, Map<String, dynamic>? properties, Map<String, dynamic>? metadata}) FactEdge
Create a copy with modifications.
getOtherNode(String nodeId) String?
Get the other node ID given one end.
getProperty(String name) → dynamic
Get a property value.
hasProperty(String name) bool
Check if edge has a property.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert to JSON.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override