Class Multiset
Represents a Multiset of possible solutions.
Inherited Members
Namespace: VDS.RDF.Query.Algebra
Assembly: dotNetRdf.dll
Syntax
public class Multiset : BaseMultiset
Constructors
| Improve this Doc View SourceMultiset()
Creates a new Empty Multiset.
Declaration
public Multiset()
Multiset(IEnumerable<string>)
Creates a new Empty Mutliset that has the list of given Variables.
Declaration
public Multiset(IEnumerable<string> variables)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T><string> | variables |
Fields
| Improve this Doc View Source_counter
Counter used to assign Set IDs.
Declaration
protected int _counter
Field Value
Type | Description |
---|---|
int |
_sets
Dictionary of Sets in the Multiset.
Declaration
protected Dictionary<int, ISet> _sets
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<TKey, TValue><int, ISet> |
_variables
Variables contained in the Multiset.
Declaration
protected List<string> _variables
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<T><string> |
Properties
| Improve this Doc View SourceCount
Gets the number of Sets in the Multiset.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
| Improve this Doc View SourceIsEmpty
Gets whether the Multiset is empty.
Declaration
public override bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View Sourcethis[int]
Gets a Set from the Multiset.
Declaration
public override ISet this[int id] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | id | Set ID. |
Property Value
Type | Description |
---|---|
ISet |
Overrides
| Improve this Doc View SourceSetIDs
Gets the IDs of Sets in the Multiset.
Declaration
public override IEnumerable<int> SetIDs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><int> |
Overrides
| Improve this Doc View SourceSets
Gets the Sets in the Multiset.
Declaration
public override IEnumerable<ISet> Sets { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ISet> |
Overrides
| Improve this Doc View SourceVariables
Gets the Variables in the Multiset.
Declaration
public override IEnumerable<string> Variables { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><string> |
Overrides
Methods
| Improve this Doc View SourceAdd(ISet)
Adds a Set to the Multiset.
Declaration
public override void Add(ISet s)
Parameters
Type | Name | Description |
---|---|---|
ISet | s | Set. |
Overrides
| Improve this Doc View SourceAddVariable(string)
Adds a Variable to the list of Variables present in this Multiset.
Declaration
public override void AddVariable(string variable)
Parameters
Type | Name | Description |
---|---|---|
string | variable | Variable. |
Overrides
| Improve this Doc View SourceContainsValue(string, INode)
Determines whether a given Value is present for a given Variable in any Set in this Multiset.
Declaration
public override bool ContainsValue(string var, INode n)
Parameters
Type | Name | Description |
---|---|---|
string | var | Variable. |
INode | n | Value. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceContainsVariable(string)
Returns whether a given Variable is present in any Set in this Multiset.
Declaration
public override bool ContainsVariable(string var)
Parameters
Type | Name | Description |
---|---|---|
string | var | Variable. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceContainsVariables(IEnumerable<string>)
Declaration
public override bool ContainsVariables(IEnumerable<string> vars)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T><string> | vars |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceIsDisjointWith(BaseMultiset)
Determines whether this Multiset is disjoint with another Multiset.
Declaration
public override bool IsDisjointWith(BaseMultiset other)
Parameters
Type | Name | Description |
---|---|---|
BaseMultiset | other | Other Multiset. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceRemove(int)
Removes a Set from the Multiset.
Declaration
public override void Remove(int id)
Parameters
Type | Name | Description |
---|---|---|
int | id | Set ID. |
Overrides
| Improve this Doc View SourceSetVariableOrder(IEnumerable<string>)
Sets the variable ordering for the multiset.
Declaration
public override void SetVariableOrder(IEnumerable<string> variables)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T><string> | variables | Variable Ordering. |
Overrides
| Improve this Doc View SourceTrim()
Trims the Multiset to remove Temporary Variables.
Declaration
public override void Trim()
Overrides
| Improve this Doc View SourceTrim(string)
Trims the Multiset to remove the given Variable.
Declaration
public override void Trim(string variable)
Parameters
Type | Name | Description |
---|---|---|
string | variable | Variable. |