Class PartitionedMultiset
Implementation of a multiset which is suitable for multiple threads to write to in parallel, useful for parallelizing certain operations.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Query.Algebra
Assembly: dotNetRDF.dll
Syntax
public class PartitionedMultiset : BaseMultiset
Constructors
| Improve this Doc View SourcePartitionedMultiset(Int32, Int32)
Creates a new Partionted Multiset.
Declaration
public PartitionedMultiset(int numPartitions, int partitionSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numPartitions | Number of partitions. |
System.Int32 | partitionSize | Partition Size. |
Properties
| Improve this Doc View SourceCount
Gets the number of sets in the multiset.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
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 SourceItem[Int32]
Gets a Set from the multiset.
Declaration
public override ISet this[int id] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id |
Property Value
Type | Description |
---|---|
ISet |
Overrides
| Improve this Doc View SourceSetIDs
Gets the Set IDs in the mutliset.
Declaration
public override IEnumerable<int> SetIDs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Int32> |
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<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<System.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
Remarks
Assumes the caller has set the ID of the set appropriately and will use this to determine which partition to add to.
|
Improve this Doc
View Source
AddVariable(String)
Adds a Variable to the multiset.
Declaration
public override void AddVariable(string variable)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|---|
System.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 |
---|---|---|
System.String | var | Variable. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceGetNextBaseID()
Gets the next Base ID to be used.
Declaration
public int GetNextBaseID()
Returns
Type | Description |
---|---|
System.Int32 |
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 |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceRemove(Int32)
Removes a Set from the multiset.
Declaration
public override void Remove(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | 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<System.String> | variables | Variable Ordering. |
Overrides
| Improve this Doc View SourceTrim()
Removes temporary variables from all sets the multiset.
Declaration
public override void Trim()
Overrides
| Improve this Doc View SourceTrim(String)
Removes a specific variable from all sets in the multiset.
Declaration
public override void Trim(string variable)
Parameters
Type | Name | Description |
---|---|---|
System.String | variable | Variable. |
Overrides
| Improve this Doc 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 |