Как назвать коллекцию ключей / значений B + Tree, которая также выступает в качестве контейнера для других коллекций

Я ищу некоторый совет, поскольку в настоящее время я рисую пробел в именовании абстракции коллекции. Это может быть немного не по теме, поэтому извиняюсь, если это будет считаться правильным.

Я работаю над библиотекой, которая предоставляет хранилище B + Tree и поддерживает несколько видов интерфейсов коллекций поверх этого B + Tree, например карты ключ / значение и отсортированные наборы.

Особый вид коллекций — это тот, который явно поддерживает вложенные дочерние коллекции в дополнение к обычному хранению ключа / значения карты. Это обеспечивает средства для поддержки пространства имен / табличного пространства / пространства ключей.

Мое текущее рабочее название для этой абстракции коллекции — «MultiMap». Но это не правильно и не соответствует, например, STL мультикарта. Но до сих пор я не смог придумать ничего лучшего.

Любые предложения для лучшего имени будут оценены.

Как дополнительная информация, обратитесь к определению интерфейса, которое я рассматриваю ниже:

/** Represents a map that can be the container for nested collections.
*  This allows having arbitrarily deep nesting for collections to support
*  organization into (hierarchies of) separate name, key or table spaces.
*  So instead of for example having a map that contains variable length
*  keys such as "users/1", "users/2", etc. a nested collection "users"*  could be created that has fixed size integer keys (1, 2, ...). Note
*  that storage for collections can be expensive. If not stored as a
*  small embedded collection with only a few items, it will take up at
*  least one physical storage page. Like in a regular map, all keys must
*  be unique and items are stored in sorted key order. */
class IMultiMapCursor : public virtual IMapCursor {
public:
/** Positions the cursor at the first nested child collection, if any */
virtual bool SeekFirstNestedCollection() = 0;

/** Moves the cursor to the next nested child collection, if any */
virtual bool SeekNextNestedCollection() = 0;

/** Opens or creates a key/value map with the given @map_id under the
*  map for this cursor, and returns a cursor to the nested map. */
virtual IMapCursor* OpenNestedMap(
const Slice& map_id,
const MapOptions& map_options = MapOptions::kOpenExisting) = 0;

/** Opens or creates a key/value map with the given @path_to_map,
*  relative to the map for this cursor, and returns a cursor to the
*  nested map. */
virtual IMapCursor* OpenNestedMap(
const CollectionPath& path_to_map,
const MapOptions& map_options = MapOptions::kOpenExisting) = 0;

/** Opens or creates a key/value multi-map with the given @map_id under
*  the map for this cursor, and returns a cursor to the nested map. */
virtual IMultiMapCursor* OpenNestedMultiMap(
const Slice& map_id,
const MapOptions& map_options = MapOptions::kOpenExisting) = 0;

/** Opens or creates a key/value multi-map with the given @path_to_map,
*  relative to the map for this cursor, and returns a cursor to the
*  nested map. */
virtual IMultiMapCursor* OpenNestedMultiMap(
const CollectionPath& path_to_map,
const MapOptions& map_options = MapOptions::kOpenExisting) = 0;

/** Opens or creates a sorted set with the given @set_id under the map
*  for this cursor, and returns a cursor to the nested set. */
virtual ISortedSetCursor* OpenNestedSortedSet(
const Slice& set_id,
const SetOptions& set_options = SetOptions::kOpenExisting) = 0;

/** Opens or creates a sorted set with the given @path_to_set,
*  relative to the map for this cursor, and returns a cursor to the
*  nested set. */
virtual ISortedSetCursor* OpenNestedSortedSet(
const CollectionPath& path_to_set,
const SetOptions& set_options = SetOptions::kOpenExisting) = 0;

/** Opens or creates a non-sorted set with the given @set_id under the
*  map for this cursor, and returns a cursor to the nested set. */
virtual ISetCursor* OpenNestedSet(
const Slice& set_id,
const SetOptions& set_options = SetOptions::kOpenExisting) = 0;

/** Opens or creates a non-sorted set with the given @path_to_set, relative to the
*  map for this cursor, and returns a cursor to the nested set. */
virtual ISetCursor* OpenNestedSet(
const CollectionPath& path_to_set,
const SetOptions& set_options = SetOptions::kOpenExisting) = 0;

/** Opens or creates a list with the given @list_id under this map, and
*  returns a cursor to the nested list. */
virtual IListCursor* OpenNestedList(
const Slice& list_id,
const ListOptions& list_options = ListOptions::kOpenExisting) = 0;

/** Opens or creates a list with the given @path_to_list under this map,
*  and returns a cursor to the nested list. */
virtual IListCursor* OpenNestedList(
const CollectionPath& path_to_list,
const ListOptions& list_options = ListOptions::kOpenExisting) = 0;

/** Renames the existing collection with id @current_id to @new_id.
*  Requires (a) @new_id to be available. (b) the collection not to
*  have an open cursor. */
virtual bool RenameNestedChildCollection(const Slice& current_id, const Slice& new_id) = 0;
};

2

Решение

Исходя из формулировки вашего вопроса, как насчет очевидного NestedMap?

Еще один, который приходит на ум, это HyperMap, Согласно определению, гипер- средства в последующий период; выше; превышения; чрезмерно; выше нормы, все это может быть использовано для описания того факта, что карта хранит больше, чем просто нормальная пара ключ / значение.

4

Другие решения

Как насчет TreeMap?
Отображаемым значением может быть одноузловое дерево (лист), представляющее пару ключ / значение, или не одноузловое дерево для чего-либо еще. Каждое значение будет полностью соответствовать определению дерева, позволяя согласованное именование, при условии, что эти структуры на самом деле являются деревьями (то есть не имеют взаимосвязей с братьями и сестрами). Обратите внимание, что даже ключ без значения будет правильным деревом.

1

Основываясь на вложенности пространств, эта коллекция позволяет, как насчет HierarchicalMap, HierarchyMap или HierMap?

1

Так как он отображает ключи / значения в дереве: KeyTree / MapTree, CollectionTree
Или, поскольку значения можно считать дискретными: DiscreteTree / DiscreteStructureTree

будет обновляться с большим количеством мыслей.

0

Это SuperMap!

Так как это карта, которая может отображать другие карты / коллекции, некоторые имена, которые приходят на ум CollectionMap, BucketMap, может быть даже BucketTree в зависимости от вашей реализации.

0

FlexMap как ваша коллекция абстракция отличается гибкостью.

Или же AlexMap или же ALXmap как вы изобрели это.

0