├── .gitignore
├── DbscanDemo
├── DbscanDemo.csproj
├── Eventing
│ ├── MyFeatureConsoleLogger.cs
│ ├── QueueExchange.cs
│ ├── QueueExchangePublisher.cs
│ └── QueueExchangeSubscriber.cs
├── MyFeature.cs
├── MyFeatureDataSource.cs
└── Program.cs
├── DbscanImplementation
├── DbscanAlgorithm.cs
├── DbscanImplementation.csproj
├── DbscanPoint.cs
├── DbscanResult.cs
├── Eventing
│ ├── EmptyDbscanEventPublisher.cs
│ ├── Events.cs
│ ├── IDbscanEventPublisher.cs
│ └── IDbscanEventSubscriber.cs
├── PointType.cs
└── ResultBuilding
│ └── DbscanResultBuilder.cs
├── README.md
└── dbscan.sln
/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 | *.*~
3 | project.lock.json
4 | .DS_Store
5 | *.pyc
6 | nupkg/
7 |
8 | # Visual Studio Code
9 | .vscode
10 |
11 | # Rider
12 | .idea
13 |
14 | # User-specific files
15 | *.suo
16 | *.user
17 | *.userosscache
18 | *.sln.docstates
19 |
20 | # Build results
21 | [Dd]ebug/
22 | [Dd]ebugPublic/
23 | [Rr]elease/
24 | [Rr]eleases/
25 | x64/
26 | x86/
27 | build/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Oo]ut/
32 | msbuild.log
33 | msbuild.err
34 | msbuild.wrn
35 |
36 | # Visual Studio 2015
37 | .vs/
--------------------------------------------------------------------------------
/DbscanDemo/DbscanDemo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Exe
9 | netcoreapp3.0
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DbscanDemo/Eventing/MyFeatureConsoleLogger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using DbscanImplementation.Eventing;
3 |
4 | namespace DbscanDemo.Eventing
5 | {
6 | public class MyFeatureConsoleLogger : IDbscanEventPublisher
7 | {
8 | public void Publish(TObj e)
9 | {
10 | //INFO: match the events you want to process
11 | var info = e switch
12 | {
13 | PointTypeAssigned pta => $"{pta.Point.ClusterId}: {pta.AssignedType}",
14 | _ => null
15 | };
16 |
17 | if (info != null)
18 | {
19 | Console.WriteLine(info);
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/DbscanDemo/Eventing/QueueExchange.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Concurrent;
2 | using System.Collections.Generic;
3 |
4 | namespace DbscanDemo.Eventing
5 | {
6 | ///
7 | /// Example for an exchange
8 | ///
9 | ///
10 | public class QueueExchange
11 | {
12 | public QueueExchange()
13 | {
14 | Queue = new ConcurrentQueue();
15 | }
16 |
17 | public ConcurrentQueue Queue { get; private set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/DbscanDemo/Eventing/QueueExchangePublisher.cs:
--------------------------------------------------------------------------------
1 | using DbscanImplementation.Eventing;
2 |
3 | namespace DbscanDemo.Eventing
4 | {
5 | ///
6 | /// An example publisher of QueueExchange
7 | ///
8 | public class QueueExchangePublisher : IDbscanEventPublisher
9 | {
10 | private readonly QueueExchange