Class WeightedOptimiser
The Weighted Optimiser is a Query Optimiser that orders Triple Patterns based on weighting computed calculated against.
Implements
Inherited Members
Namespace: VDS.RDF.Query.Optimisation
Assembly: dotNetRdf.dll
Syntax
public class WeightedOptimiser : BaseQueryOptimiser, IQueryOptimiser
Constructors
| Edit this page View SourceWeightedOptimiser()
Creates a new Weighted Optimiser.
Declaration
public WeightedOptimiser()
WeightedOptimiser(IGraph)
Creates a new Weighted Optimiser which reads weights from the given RDF Graph.
Declaration
public WeightedOptimiser(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
WeightedOptimiser(IGraph, double, double, double)
Creates a new Weighted Optimiser which reads weights from the given RDF Graph.
Declaration
public WeightedOptimiser(IGraph g, double subjWeight, double predWeight, double objWeight)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
double | subjWeight | Default Subject Weight. |
double | predWeight | Default Predicate Weight. |
double | objWeight | Default Object Weight. |
Fields
| Edit this page View SourceDefaultObjectWeight
Default Weight for Object Terms.
Declaration
public const double DefaultObjectWeight = 0.6
Field Value
Type | Description |
---|---|
double |
DefaultPredicateWeight
Default Weight for Predicate Terms.
Declaration
public const double DefaultPredicateWeight = 0.4
Field Value
Type | Description |
---|---|
double |
DefaultSubjectWeight
Default Weight for Subject Terms.
Declaration
public const double DefaultSubjectWeight = 0.8
Field Value
Type | Description |
---|---|
double |
DefaultVariableWeight
Default Weight for Variables.
Declaration
public const double DefaultVariableWeight = 1
Field Value
Type | Description |
---|---|
double |
Methods
| Edit this page View SourceGetRankingComparer()
Gets the comparer used to order the Triple Patterns based on their computed weightings.
Declaration
protected override IComparer<ITriplePattern> GetRankingComparer()
Returns
Type | Description |
---|---|
IComparer<ITriplePattern> |