Class PartitionedMultiset
Implementation of a multiset which is suitable for multiple threads to write to in parallel, useful for parallelizing certain operations.
Inherited Members
Namespace: VDS.RDF.Query.Algebra
Assembly: dotNetRdf.dll
Syntax
public class PartitionedMultiset : BaseMultiset
Constructors
| Edit this page View SourcePartitionedMultiset(int, int)
Creates a new Partionted Multiset.
Declaration
public PartitionedMultiset(int numPartitions, int partitionSize)
Parameters
Type | Name | Description |
---|---|---|
int | numPartitions | Number of partitions. |
int | partitionSize | Partition Size. |
Properties
| Edit this page View SourceCount
Gets the number of sets in the multiset.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceIsEmpty
Gets whether the multiset is empty.
Declaration
public override bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
| Edit this page View Sourcethis[int]
Gets a Set from the multiset.
Declaration
public override ISet this[int id] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | id |
Property Value
Type | Description |
---|---|
ISet |
Overrides
| Edit this page View SourceSetIDs
Gets the Set IDs in the mutliset.
Declaration
public override IEnumerable<int> SetIDs { get; }
Property Value
Type | Description |
---|---|
IEnumerable<int> |
Overrides
| Edit this page View SourceSets
Gets the sets in the multiset.
Declaration
public override IEnumerable<ISet> Sets { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ISet> |
Overrides
| Edit this page View SourceVariables
Gets the variables in the multiset.
Declaration
public override IEnumerable<string> Variables { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Overrides
Methods
| Edit this page View SourceAdd(ISet)
Adds a Set to the multiset.
Declaration
public override void Add(ISet s)
Parameters
Type | Name | Description |
---|---|---|
ISet | s | Set. |
Overrides
Remarks
Assumes the caller has set the ID of the set appropriately and will use this to determine which partition to add to.
AddVariable(string)
Adds a Variable to the multiset.
Declaration
public override void AddVariable(string variable)
Parameters
Type | Name | Description |
---|---|---|
string | variable | Variable. |
Overrides
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page View SourceContainsVariables(IEnumerable<string>)
Returns whether the given Variables are present in any Set in this Multiset.
Declaration
public override bool ContainsVariables(IEnumerable<string> vars)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<string> | vars | Variables. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetNextBaseID()
Gets the next Base ID to be used.
Declaration
public int GetNextBaseID()
Returns
Type | Description |
---|---|
int |
IsDisjointWith(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 |
---|---|
bool |
Overrides
| Edit this page 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
| Edit this page View SourceSetVariableOrder(IEnumerable<string>)
Sets the variable ordering for the multiset.
Declaration
public override void SetVariableOrder(IEnumerable<string> variables)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<string> | variables | Variable Ordering. |
Overrides
| Edit this page View SourceTrim()
Removes temporary variables from all sets the multiset.
Declaration
public override void Trim()
Overrides
| Edit this page View SourceTrim(string)
Removes a specific variable from all sets in the multiset.
Declaration
public override void Trim(string variable)
Parameters
Type | Name | Description |
---|---|---|
string | variable | Variable. |
Overrides
| Edit this page View SourceUnion(BaseMultiset)
Does a Union of this Multiset and another Multiset.
Declaration
public override BaseMultiset Union(BaseMultiset other)
Parameters
Type | Name | Description |
---|---|---|
BaseMultiset | other | Other Multiset. |
Returns
Type | Description |
---|---|
BaseMultiset |