3333// #include <geode/stochastic/configuration/neighbors_object_ids.hpp>
3434namespace geode
3535{
36- struct GroupDescriptor
36+ struct SubSetDescriptor
3737 {
3838 geode::uuid unique_id;
39- bool operator ==( GroupDescriptor const & other ) const noexcept
39+ bool operator ==( SubSetDescriptor const & other ) const noexcept
4040 {
4141 {
4242 return unique_id == other.unique_id ;
@@ -46,32 +46,32 @@ namespace geode
4646
4747 struct ObjectId
4848 {
49- index_t object ;
50- uuid group ;
49+ index_t index ;
50+ uuid subset ;
5151 bool operator ==( const ObjectId& other ) const noexcept
5252 {
53- return object == other.object && group == other.group ;
53+ return index == other.index && subset == other.subset ;
5454 }
5555 };
5656} // namespace geode
5757
5858namespace geode
5959{
60- template < typename Object >
61- class Configuration
60+ template < typename Type >
61+ class ObjectSet
6262 {
6363 public:
64- const std::vector< Object >& get_group ( const uuid& group_id ) const ;
65- const Object & get_object ( const ObjectId& object_id ) const ;
64+ const std::vector< Type >& get_subset ( const uuid& subset_id ) const ;
65+ const Type & get_object ( const ObjectId& object_id ) const ;
6666 std::vector< ObjectId > get_all_object () const ;
6767
68- index_t nb_groups () const ;
69- index_t nb_objects_in_group ( const uuid& group_id ) const ;
68+ index_t nb_subsets () const ;
69+ index_t nb_objects_in_subset ( const uuid& subset_id ) const ;
7070 index_t nb_objects () const ;
7171
72- void add_group ( const uuid& group_id );
73- ObjectId add_object ( Object && object, const uuid& group_id );
74- void update_object ( const ObjectId& object_id, Object && object );
72+ void add_subset ( const uuid& subset_id );
73+ ObjectId add_object ( Type && object, const uuid& subset_id );
74+ void update_object ( const ObjectId& object_id, Type && object );
7575 void remove_object ( const ObjectId& object_id );
7676
7777 // Object neighbor search by ObjectId (always excludes self)
@@ -80,13 +80,13 @@ namespace geode
8080 // Object neighbor search by arbitrary object (return self if in the
8181 // configuration)
8282 std::vector< ObjectId > neighbors (
83- const Object & object, double searching_distance ) const ;
83+ const Type & object, double searching_distance ) const ;
8484
8585 private:
86- std::vector< Object >& get_group ( const uuid& group_id );
86+ std::vector< Type >& get_subset ( const uuid& subset_id );
8787
8888 private:
89- std::unordered_map< uuid, std::vector< Object > > groups_;
89+ std::unordered_map< uuid, std::vector< Type > > groups_;
9090 // ObjectIndexRTree< 2 > tree_;
9191 };
9292} // namespace geode
0 commit comments