Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7609abb
24886: Adds scaffolding for clustering
howsohazard Dec 23, 2025
4fa8247
24886: More progress
howsohazard Dec 23, 2025
e102891
Merge branch 'main' into 24886-clustering
howsohazard Dec 28, 2025
bc4a279
24886: More implementation progress
howsohazard Dec 29, 2025
32559d2
24886: Rearranges code to make room for clustering
howsohazard Dec 29, 2025
f892aa8
24886: Refactoring and progress
howsohazard Dec 30, 2025
af182c4
Merge branch 'main' into 24886-clustering
howsohazard Dec 30, 2025
2f19b5e
24886: More implementation
howsohazard Dec 30, 2025
f5748c1
24886: More implementation
howsohazard Dec 30, 2025
29a8b35
24886: Implements main clustering algorithm
howsohazard Jan 1, 2026
1ae3a39
24886: Finishes primary implementation of clustering
howsohazard Jan 1, 2026
ba60b87
24886: Fixes compiler complaints
howsohazard Jan 1, 2026
ba55715
Merge branch 'main' into 24886-clustering
howsohazard Jan 1, 2026
0319abe
Merge branch 'main' into 24886-clustering
howsoRes Jan 1, 2026
17074a0
24886: Rearranges code to make it faster to rebuild
howsohazard Jan 6, 2026
15ebbdc
24886: Adds another test and missing file
howsohazard Jan 6, 2026
b569236
24886: Some code cleanup
howsohazard Jan 6, 2026
57929a4
24886: Minor code cleanup
howsohazard Jan 7, 2026
be67899
24886: Fixes typo
howsohazard Jan 7, 2026
42fce2a
24886: Updates print
howsohazard Jan 7, 2026
ed4e246
24886: Fixes issue accumulating weight to root node
howsohazard Jan 7, 2026
7288326
24886: Fixes issue where minimum cluster size was not respected
howsohazard Jan 7, 2026
5ee2d23
24886: Updates variable names
howsohazard Jan 7, 2026
02b1220
24886: More algorithm correction and todo
howsohazard Jan 7, 2026
8cf0694
24886: Moves ComputeCaseClusters into cpp file
howsohazard Jan 7, 2026
b84e61e
24886: New clustering algorithm, base implementation
howsohazard Jan 7, 2026
b1a5d51
24886: Improvements to clustering algorithm
howsohazard Jan 7, 2026
1802c32
24886: More implementation
howsohazard Jan 8, 2026
92f8b82
24886: Fixes compiler issue
howsohazard Jan 8, 2026
0a93170
24886: Performance improvements and code cleanup
howsohazard Jan 8, 2026
e14388d
24886: Improves quality
howsohazard Jan 12, 2026
157208c
24886: More code experiments
howsohazard Jan 13, 2026
af74ca1
24886: More experiments
howsohazard Jan 13, 2026
7e1a8f0
Merge branch 'main' into 24886-clustering
howsohazard Jan 16, 2026
5eb1854
Merge branch 'main' into 24886-clustering
howsohazard Jan 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ set(COMMON_SOURCE
src/Amalgam/AssetManager.h
src/Amalgam/BinaryPacking.cpp
src/Amalgam/BinaryPacking.h
src/Amalgam/Conviction.h
src/Amalgam/Cryptography.cpp
src/Amalgam/Cryptography.h
src/Amalgam/DateTimeFormat.cpp
Expand All @@ -128,6 +127,8 @@ set(COMMON_SOURCE
src/Amalgam/entity/EntityManipulation.h
src/Amalgam/entity/EntityQueries.cpp
src/Amalgam/entity/EntityQueries.h
src/Amalgam/entity/EntityQueriesDensityFunctions.cpp
src/Amalgam/entity/EntityQueriesDensityFunctions.h
src/Amalgam/entity/EntityQueriesStatistics.h
src/Amalgam/entity/EntityQueryBuilder.h
src/Amalgam/entity/EntityQueryCaches.cpp
Expand Down
9 changes: 9 additions & 0 deletions docs/language.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/Amalgam/Amalgam.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@
<ClCompile Include="entity\EntityExternalInterface.cpp" />
<ClCompile Include="entity\EntityManipulation.cpp" />
<ClCompile Include="entity\EntityQueries.cpp" />
<ClCompile Include="entity\EntityQueriesDensityFunctions.cpp" />
<ClCompile Include="entity\EntityQueryCaches.cpp" />
<ClCompile Include="entity\EntityWriteListener.cpp" />
<ClCompile Include="evaluablenode\EvaluableNode.cpp" />
Expand Down Expand Up @@ -611,14 +612,14 @@
<ClInclude Include="AssetManager.h" />
<ClInclude Include="BinaryPacking.h" />
<ClInclude Include="Concurrency.h" />
<ClInclude Include="Conviction.h" />
<ClInclude Include="Cryptography.h" />
<ClInclude Include="DateTimeFormat.h" />
<ClInclude Include="DistanceReferencePair.h" />
<ClInclude Include="entity\Entity.h" />
<ClInclude Include="entity\EntityExternalInterface.h" />
<ClInclude Include="entity\EntityManipulation.h" />
<ClInclude Include="entity\EntityQueries.h" />
<ClInclude Include="entity\EntityQueriesDensityFunctions.h" />
<ClInclude Include="entity\EntityQueriesStatistics.h" />
<ClInclude Include="entity\EntityQueryBuilder.h" />
<ClInclude Include="entity\EntityQueryCaches.h" />
Expand Down
6 changes: 3 additions & 3 deletions src/Amalgam/Amalgam.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@
<ClInclude Include="FilenameEscapeProcessor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Conviction.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PartialSum.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -338,6 +335,9 @@
<ClInclude Include="importexport\FileSupportYAML.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="entity\EntityQueriesDensityFunctions.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc">
Expand Down
13 changes: 13 additions & 0 deletions src/Amalgam/KnnCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ class KnnCache
*positionLabelIds, index, top_k, radiusLabelId, from_indices, true, expand_to_first_nonzero_distance, out);
}

//returns the container for the knn cache for index
//note that this should only be called after PreCacheKnn has been called
std::vector<DistanceReferencePair<size_t>> &GetKnnCache(size_t index)
{
return cachedNeighbors[index];
}

//returns a pointer to the relevant indices of the cache
constexpr BitArrayIntegerSet *GetRelevantEntities()
{
Expand All @@ -169,6 +176,12 @@ class KnnCache
return relevantIndices->GetEndInteger();
}

//returns the generalized distance evaluator
inline GeneralizedDistanceEvaluator *GetDistanceEvaluator()
{
return distEvaluator;
}

protected:
//cache of nearest neighbor results. The index of cache is the entity, and the corresponding vector are its nearest neighbors.
std::vector<std::vector<DistanceReferencePair<size_t>>> cachedNeighbors;
Expand Down
1 change: 1 addition & 0 deletions src/Amalgam/Opcodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ void StringInternPool::InitializeStaticStrings()
EmplaceNodeTypeString(ENT_QUERY_ENTITY_DISTANCE_CONTRIBUTIONS, "query_entity_distance_contributions");
EmplaceNodeTypeString(ENT_QUERY_ENTITY_KL_DIVERGENCES, "query_entity_kl_divergences");
EmplaceNodeTypeString(ENT_QUERY_ENTITY_CUMULATIVE_NEAREST_ENTITY_WEIGHTS, "query_entity_cumulative_nearest_entity_weights");
EmplaceNodeTypeString(ENT_QUERY_ENTITY_CLUSTERS, "query_entity_clusters");

//entity access
EmplaceNodeTypeString(ENT_CONTAINS_LABEL, "contains_label");
Expand Down
Loading