由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
CS版 - 問一個數據結構的問題
相关主题
有个问题问下各位做machine learning的朋友需要用C++编一些 data structure 的程序,是直接用STL还是自己编呢?
有人做fuzzy clustering的么? (转载)请推荐data structure的书
Basic Question About Indexing in Database求教:data structure 经典入门书籍
What is the meaning of attribute weights in SVM?求教,急
Database Administrator Job opportunityA question on NP-hard, maybe sound stupid
Database Administrator Job opportunity牛人请来看看这个问题?优化问题还是NP?
DBA job opportunityQuestion: complexity of subset sum
数据科学之江湖兵器谱 (转载)Google面试怎么这么难啊,LG很难过,我该怎么劝他呢? (转载)
相关话题的讨论汇总
话题: objects话题: attribute话题: value话题: data话题: structure
进入CS版参与讨论
1 (共1页)
w******c
发帖数: 574
1
assume there are a set of data objects O = {o_1, ..., o_n}, each of which
has two attributes a and b. given a subset of objects P \in O, which data
structure (index) should we build on O, such that for a specific value of
attribute a, we could obtain the value range for objects on attribute b.
for instance, assuming we have object o_1, o_3, o_7 and know the attribute
values for these objects, we want to know the value on attribute b for
objects o_i such that o_i.a is equal to a specific value. what data
structure should we build on ojbect set O, both space and time efficient?
thanks.
S**I
发帖数: 15689
2
objects in O should be sorted according to the value of a, so I think binary
tree.

【在 w******c 的大作中提到】
: assume there are a set of data objects O = {o_1, ..., o_n}, each of which
: has two attributes a and b. given a subset of objects P \in O, which data
: structure (index) should we build on O, such that for a specific value of
: attribute a, we could obtain the value range for objects on attribute b.
: for instance, assuming we have object o_1, o_3, o_7 and know the attribute
: values for these objects, we want to know the value on attribute b for
: objects o_i such that o_i.a is equal to a specific value. what data
: structure should we build on ojbect set O, both space and time efficient?
: thanks.

w******c
发帖数: 574
3
thanks for your quick response.
i forgot to mention that objects could have duplicate values on attribute a
or b. is binary tree still good in such case?

binary

【在 S**I 的大作中提到】
: objects in O should be sorted according to the value of a, so I think binary
: tree.

S**I
发帖数: 15689
4
Of course; for example, C++ STL has multiset and multimap, which allow
existence of elments with equivalent keys. Also, both of them have a member
function equal_range, which does exactly what you want.

a

【在 w******c 的大作中提到】
: thanks for your quick response.
: i forgot to mention that objects could have duplicate values on attribute a
: or b. is binary tree still good in such case?
:
: binary

1 (共1页)
进入CS版参与讨论
相关主题
Google面试怎么这么难啊,LG很难过,我该怎么劝他呢? (转载)Database Administrator Job opportunity
我的证明:P is a subset of NPDatabase Administrator Job opportunity
An algorihmic questionDBA job opportunity
theory高手帮我做个题吧。数据科学之江湖兵器谱 (转载)
有个问题问下各位做machine learning的朋友需要用C++编一些 data structure 的程序,是直接用STL还是自己编呢?
有人做fuzzy clustering的么? (转载)请推荐data structure的书
Basic Question About Indexing in Database求教:data structure 经典入门书籍
What is the meaning of attribute weights in SVM?求教,急
相关话题的讨论汇总
话题: objects话题: attribute话题: value话题: data话题: structure