similarityFilter Directory Reference
+ Directory dependency graph for similarityFilter:

Files

 SimilarityFilter.cpp
 
 SimilarityFilter.h
 

Detailed Description

The similarity filter currently compares snapshots on aron::data::Variant level. Custom ARON objects are therefore seen as generic data structures: objects become Dict, lists stay List, and types such as Quaternion, Matrix, Image, or PointCloud become NDArray.

To support custom type-specific similarity, the filter should receive the matching aron::type::ObjectPtr together with each EntitySnapshot. This type is available from the memory segment metadata in storeSnapshotsAsync.

Suggested extension path:

  1. Add a typed SnapshotFilter::accept(snapshot, aronType, simulatedVersion) overload.
  2. Resolve the snapshot type from PendingConversion::SegmentMetadata before filtering.
  3. Pass the type into SnapshotSimilarityFilter::calculateSnapshotSimilarity.
  4. During recursive comparison, walk the data tree and type tree in parallel.
  5. For Object/Dict fields, use Object::getMemberType(key) to pass the correct child type.
  6. Dispatch specialized comparators when the expected type is known, e.g. QUATERNION.