Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
OptionalPattern.cs
2using System.Threading.Tasks;
5
7{
12 {
19 : base(Left, Right)
20 {
21 }
22
31 public override async Task<IEnumerable<Possibility>> Search(ISemanticCube Cube,
32 Variables Variables, IEnumerable<Possibility> ExistingMatches, SparqlQuery Query)
33 {
34 ExistingMatches = await this.Left.Search(Cube, Variables, ExistingMatches, Query);
35 if (ExistingMatches is null)
36 return null;
37
39
40 foreach (Possibility P in ExistingMatches)
41 {
42 IEnumerable<Possibility> NewMatches = await this.Right.Search(Cube, Variables,
43 new Possibility[] { P }, Query);
44
45 if (NewMatches is null)
46 NewMatches2.Add(P);
47 else
48 {
49 foreach (Possibility P2 in NewMatches)
50 NewMatches2.Add(P2);
51 }
52 }
53
54 return NewMatches2;
55 }
56 }
57}
A chunked list is a linked list of chunks of objects of type T .
Definition: ChunkedList.cs:54
OptionalPattern(ISparqlPattern Left, ISparqlPattern Right)
Optional pattern.
override async Task< IEnumerable< Possibility > > Search(ISemanticCube Cube, Variables Variables, IEnumerable< Possibility > ExistingMatches, SparqlQuery Query)
Searches for the pattern on information in a semantic cube.
Represents a possible solution during SPARQL evaluation.
Definition: Possibility.cs:13
Collection of variables.
Definition: Variables.cs:25
Interface for semantic cubes.
Task< IEnumerable< Possibility > > Search(ISemanticCube Cube, Variables Variables, IEnumerable< Possibility > ExistingMatches, SparqlQuery Query)
Searches for the pattern on information in a semantic cube.