Show / Hide Table of Contents

Class BaseMultiset

Abstract Base Class for representing Multisets.

Inheritance
object
BaseMultiset
IdentityMultiset
Multiset
NullMultiset
PartitionedMultiset
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Query.Algebra
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseMultiset

Constructors

| Edit this page View Source

BaseMultiset(bool)

Create a new multiset.

Declaration
public BaseMultiset(bool usePLinqEvaluation = true)
Parameters
Type Name Description
bool usePLinqEvaluation

If true, then LINQ parallel operators will be used when evaluating set operations using this multiset.

Fields

| Edit this page View Source

_orderedIDs

List of IDs that is used to return the Sets in order if the Multiset has been sorted.

Declaration
protected List<int> _orderedIDs
Field Value
Type Description
List<int>

Properties

| Edit this page View Source

Count

Gets the Count of Sets in the Multiset.

Declaration
public virtual int Count { get; }
Property Value
Type Description
int
| Edit this page View Source

IsEmpty

Returns whether the Multiset is Empty.

Declaration
public abstract bool IsEmpty { get; }
Property Value
Type Description
bool
| Edit this page View Source

this[int]

Retrieves the Set with the given ID.

Declaration
public abstract ISet this[int id] { get; }
Parameters
Type Name Description
int id

ID.

Property Value
Type Description
ISet
| Edit this page View Source

SetIDs

Gets the IDs of Sets in the Multiset.

Declaration
public abstract IEnumerable<int> SetIDs { get; }
Property Value
Type Description
IEnumerable<int>
| Edit this page View Source

Sets

Gets the Sets in the Multiset.

Declaration
public abstract IEnumerable<ISet> Sets { get; }
Property Value
Type Description
IEnumerable<ISet>
| Edit this page View Source

UsePLinqEvaluation

Get whether this multiset will use LINQ parallel operators for evaluating set operations.

Declaration
public bool UsePLinqEvaluation { get; }
Property Value
Type Description
bool
| Edit this page View Source

Variables

Gets the Variables in the Multiset.

Declaration
public abstract IEnumerable<string> Variables { get; }
Property Value
Type Description
IEnumerable<string>
| Edit this page View Source

VirtualCount

The number of results that would be returned without any limit clause to a query or -1 if not supported. Defaults to the same value as the Count member.

Declaration
public int VirtualCount { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

Add(ISet)

Adds a Set to the Multiset.

Declaration
public abstract void Add(ISet s)
Parameters
Type Name Description
ISet s

Set to add.

| Edit this page View Source

AddVariable(string)

Adds a Variable to the Multiset.

Declaration
public abstract void AddVariable(string variable)
Parameters
Type Name Description
string variable

Variable.

| Edit this page View Source

ContainsValue(string, INode)

Determines whether the Multiset contains the given Value for the given Variable.

Declaration
public abstract bool ContainsValue(string var, INode n)
Parameters
Type Name Description
string var

Variable.

INode n

Value.

Returns
Type Description
bool
| Edit this page View Source

ContainsVariable(string)

Determines whether the Multiset contains the given Variable.

Declaration
public abstract bool ContainsVariable(string var)
Parameters
Type Name Description
string var

Variable.

Returns
Type Description
bool
| Edit this page View Source

ContainsVariables(IEnumerable<string>)

Determines whether the Multiset contains all of the given variables.

Declaration
public abstract bool ContainsVariables(IEnumerable<string> vars)
Parameters
Type Name Description
IEnumerable<string> vars

Variables.

Returns
Type Description
bool

True if all of the variables in vars are contained in the multiset, or if vars is the empty set.

| Edit this page View Source

ExistsJoin(BaseMultiset, bool)

Does an Exists Join of this Multiset to another Multiset where the Join is predicated on the existence/non-existence of a joinable solution on the RHS.

Declaration
public virtual BaseMultiset ExistsJoin(BaseMultiset other, bool mustExist)
Parameters
Type Name Description
BaseMultiset other

Other Multiset.

bool mustExist

Whether a solution must exist in the Other Multiset for the join to be made.

Returns
Type Description
BaseMultiset
| Edit this page View Source

IsDisjointWith(BaseMultiset)

Determines whether the Multiset is disjoint with the given Multiset.

Declaration
public abstract bool IsDisjointWith(BaseMultiset other)
Parameters
Type Name Description
BaseMultiset other

Multiset.

Returns
Type Description
bool
| Edit this page View Source

Join(BaseMultiset)

Joins this Multiset to another Multiset.

Declaration
public virtual BaseMultiset Join(BaseMultiset other)
Parameters
Type Name Description
BaseMultiset other

Other Multiset.

Returns
Type Description
BaseMultiset
| Edit this page View Source

LeftJoin(BaseMultiset, ISparqlExpression, SparqlEvaluationContext, ISparqlExpressionProcessor<IValuedNode, SparqlEvaluationContext, int>)

Does a Left Join of this Multiset to another Multiset where the Join is predicated on the given Expression.

Declaration
public virtual BaseMultiset LeftJoin(BaseMultiset other, ISparqlExpression expr, SparqlEvaluationContext baseContext, ISparqlExpressionProcessor<IValuedNode, SparqlEvaluationContext, int> expressionProcessor)
Parameters
Type Name Description
BaseMultiset other

Other Multiset.

ISparqlExpression expr

Expression.

SparqlEvaluationContext baseContext

The base evaluation context providing access to the query evaluation options to use when evaluating the join.

ISparqlExpressionProcessor<IValuedNode, SparqlEvaluationContext, int> expressionProcessor

The processor to use to evaluate expr.

Returns
Type Description
BaseMultiset
| Edit this page View Source

Merge(BaseMultiset)

Does a merge of this multiset and another multiset, avoiding adding duplicate sets to this multiset.

Declaration
public virtual BaseMultiset Merge(BaseMultiset other)
Parameters
Type Name Description
BaseMultiset other

The multiset to be merged into this multiset.

Returns
Type Description
BaseMultiset

This multiset.

Remarks

The merge operation adds only sets from other that do not exist in this multiset.

| Edit this page View Source

MinusJoin(BaseMultiset)

Does a Minus Join of this Multiset to another Multiset where any joinable results are subtracted from this Multiset to give the resulting Multiset.

Declaration
public virtual BaseMultiset MinusJoin(BaseMultiset other)
Parameters
Type Name Description
BaseMultiset other

Other Multiset.

Returns
Type Description
BaseMultiset
| Edit this page View Source

Product(BaseMultiset)

Does a Product of this Multiset and another Multiset.

Declaration
public virtual BaseMultiset Product(BaseMultiset other)
Parameters
Type Name Description
BaseMultiset other

Other Multiset.

Returns
Type Description
BaseMultiset
| Edit this page View Source

Remove(int)

Removes a Set (by ID) from the Multiset.

Declaration
public abstract void Remove(int id)
Parameters
Type Name Description
int id

ID.

| Edit this page View Source

SetVariableOrder(IEnumerable<string>)

Sets the variable ordering for the multiset.

Declaration
public abstract void SetVariableOrder(IEnumerable<string> variables)
Parameters
Type Name Description
IEnumerable<string> variables

Variable Ordering.

| Edit this page View Source

Sort(IComparer<ISet>)

Sorts a Set based on the given Comparer.

Declaration
public virtual void Sort(IComparer<ISet> comparer)
Parameters
Type Name Description
IComparer<ISet> comparer

Comparer on Sets.

| Edit this page View Source

ToString()

Gets the string representation of the multiset (intended for debugging only).

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
| Edit this page View Source

Trim()

Trims the Multiset of Temporary Variables.

Declaration
public virtual void Trim()
| Edit this page View Source

Trim(string)

Trims the Multiset by removing all Values for the given Variable.

Declaration
public virtual void Trim(string variable)
Parameters
Type Name Description
string variable

Variable.

| Edit this page View Source

Union(BaseMultiset)

Does a Union of this Multiset and another Multiset.

Declaration
public virtual BaseMultiset Union(BaseMultiset other)
Parameters
Type Name Description
BaseMultiset other

Other Multiset.

Returns
Type Description
BaseMultiset

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
AlgebraExtensions.ProductWithTimeout(BaseMultiset, BaseMultiset, long)
  • Edit this page
  • View Source
In this article
  • Constructors
    • BaseMultiset(bool)
  • Fields
    • _orderedIDs
  • Properties
    • Count
    • IsEmpty
    • this[int]
    • SetIDs
    • Sets
    • UsePLinqEvaluation
    • Variables
    • VirtualCount
  • Methods
    • Add(ISet)
    • AddVariable(string)
    • ContainsValue(string, INode)
    • ContainsVariable(string)
    • ContainsVariables(IEnumerable<string>)
    • ExistsJoin(BaseMultiset, bool)
    • IsDisjointWith(BaseMultiset)
    • Join(BaseMultiset)
    • LeftJoin(BaseMultiset, ISparqlExpression, SparqlEvaluationContext, ISparqlExpressionProcessor<IValuedNode, SparqlEvaluationContext, int>)
    • Merge(BaseMultiset)
    • MinusJoin(BaseMultiset)
    • Product(BaseMultiset)
    • Remove(int)
    • SetVariableOrder(IEnumerable<string>)
    • Sort(IComparer<ISet>)
    • ToString()
    • Trim()
    • Trim(string)
    • Union(BaseMultiset)
  • Extension Methods
Back to top Generated by DocFX