admin管理员组文章数量:1405393
Suppose I have a bunch of high-dimensional data. Each datapoint can have a number of categorical attributes associated with it (e.g. colour, place of manufacture). The number of attributes associated with each datapoint, as well as the number of different possible attributes and what they are, is determined by the data and is not known at compile-time. For example, imagine I have a matrix of n
vector embeddings with dimensionality d
, and each embedding can have one or more attributes from the set red, green, blue, yellow, purple, orange, brown, white
associated with it.
My goal is to be able to create indexes for different groupings of these attributes for quick lookup. For example, I want to be able to create a composite index for red, green, blue
and find out which datapoints have those attributes (more generally, I want to create composite indexes for many different subgroups of attributes). However, I do not know in advance what the different possible attributes are until I process the data from a file.
I have been looking at boost::multi_index
to help me do this. I have found ways to create indexes for individual named attributes and composite indexes with composite key lookup for multiple attributes, but it is unclear to me what is the best way to do this without knowing the attributes or which groupings of them I want to index in advance (for example, if I want to split the attributes in four groups and create a composite index for each group).
本文标签: cHow to create dynamic attributebased composite indexes with Boost multiindexStack Overflow
版权声明:本文标题:c++ - How to create dynamic attribute-based composite indexes with Boost multi_index? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744226951a2596137.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论