Jump to content
  • Advertisement
Sign in to follow this  
derek7

multiset

This topic is 4482 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

1 question: how to initial a list number ? set<int> s = {................}; something like this, but I know it will no work for set. same question occur at vector: vector<int> alistofint = {...........} I must use a loop to initial a vector? if yes, does it is more slow than int i[] = {.................}? 2 size_type is just a unsigned int, why does unsigned int directly used?

Share this post


Link to post
Share on other sites
Advertisement
Here are some not-terribly-well-informed answers:
Quote:
Original post by derek7
1 question:
how to initial a list number ?

set<int> s = {................}; something like this, but I know it will no work for set.

same question occur at vector:

vector<int> alistofint = {...........} I must use a loop to initial a vector?
if yes, does it is more slow than int i[] = {.................}?
I don't believe the standard library includes any syntax for element-wise assignment like the above examples. The boost assignment library addresses this, but I don't know how its performance would stack up against, say, a straight loop (you could always try it; the library is pretty easy to use).

The other obvious question is why you need to do this; the above syntax suggests that you know the number of elements at compile time, in which case a different container (perhaps boost::array) might be more appropriate. Of course if you just want to assign initial values while leaving the option to resize open, that won't work.
Quote:
2 size_type is just a unsigned int, why does unsigned int directly used?
size_t and unsigned int have different requirements as far as the standard is concerned, and they may have different sizes on different platforms or compilers (specifically 64-bit).

Share this post


Link to post
Share on other sites
Quote:
Original post by derek7
1 question:
how to initial a list number ?

set<int> s = {................}; something like this, but I know it will no work for set.

same question occur at vector:

vector<int> alistofint = {...........} I must use a loop to initial a vector?
if yes, does it is more slow than int i[] = {.................}?

Yeah, you'll need to use a loop for that because as far as I know, you can't assign a set like that to any object in C++.

And yes, it will be slower than just using a normal array as the vector has to allocate memory from the heap which (I'm assuming here) takes more time that to allocate on the stack, along with the fact that you'll probably need to call 'push_back' or something similar for each element you want to add.


Quote:
Original post by derek7
2 size_type is just a unsigned int, why does unsigned int directly used?

Because while on your computer, most of the size types will be an 'unsigned int', on other computers it might be different.

Edit:: yeah, listen to jyk, he says the same thing, but with more expertise. [grin]

Share this post


Link to post
Share on other sites
if I wanna initialization is very quick. how to do it? can stl or other class not be used? must I use something like int numberlist[size] = {};?

Share this post


Link to post
Share on other sites
Quote:
Original post by derek7
if I wanna initialization is very quick. how to do it? can stl or other class not be used? must I use something like int numberlist[size] = {};?
Can you tell us what the array is for? That might make it easier to recommend a solution.

Also, it should be mentioned that there are ways to initialize all elements of some STL containers to the same value; just not per-element.

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
I don't believe the standard library includes any syntax for element-wise assignment like the above examples.


It's not just a library issue, it's a language limitation. The possibility of adding "range constructors" to the language has been discussed, but I don't know what has come out of it.

Edit: see there.

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
Quote:
Original post by derek7
if I wanna initialization is very quick. how to do it? can stl or other class not be used? must I use something like int numberlist[size] = {};?
Can you tell us what the array is for? That might make it easier to recommend a solution.

Also, it should be mentioned that there are ways to initialize all elements of some STL containers to the same value; just not per-element.


OK! another question arise here:

given a list of int number, how to get a number that have max appearence times.

here is my code:

#include <map>
#include <vector>
#include <set>
#include <iostream>
#include <windows.h>

#pragma comment(lib, "winmm")
int maxInt()
{
std::multiset<int> s;
int number[] = {1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,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7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2
};

int cnt = sizeof(number)/sizeof(int);
for (int i=0;i<cnt;i++)
{
// here initializtion of stl set, how to speed it up???
s.insert(number);
}

int max = 0;
int id = 0;

for(int i=0;i<cnt;i++)
{
int tmp;
tmp = s.count(number);
if (max < tmp)
{
max = tmp;
id = i;
}
}
return id;
}

void main()
{
int pre = timeGetTime();
int result = maxInt();
int delta = timeGetTime() - pre;
std::cout<<result<<'\n' <<"time: "<<delta<<'\n';

}

Share this post


Link to post
Share on other sites
You can speed up the multiset construction using the range constructor:
int maxInt()
{
int number[] = {1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,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4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2
};
std::multiset<int> s(number, number + (sizeof(number) / sizeof(number[0])));
// ...
}


Or you can speed up the entire computation by not using a multiset.
Known dense range:
// a templated class for counting elements of a known dense range
template < int Min, int Max >
class Count
{

public:

Count()
{
// the end of the range must not be before the start of
// the range
assert(Max >= Min);

// initialise all counts to zero
std::fill_n(counts_, (Max - Min) + 1, 0);
}

void operator()(int i)
{
// error checking
assert(i >= Min && i <= Max);

// increase the count for i
++counts_[i - Min];
}

int maxElement() const
{
// max_element returns an iterator to the largest
// element. distance computes the index of the element
// in the array. Adding Min then gives the value of the
// most frequent element
return Min + std::distance(counts_, std::max_element(counts_, counts_ + (Max - Min) + 1));
}

private:

std::size_t counts_[(Max - Min) + 1];
};

int maxInt()
{
int number[] = {1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,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4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2
};
return std::for_each(number, number + (sizeof(number) / sizeof(number[0])), Count< 1, 9 >()).maxElement();
}


Unknown or sparse range:
// A templated class which when gives two map entries will return whether
// the data value of the first entry is less than the data value of the second,
// i.e. for entries std::pair< X, Y >(x1, y1) and std::pair< X, Y >(x2, y2)
// the class will return y1 < y2.
template < typename MapValueType >
struct LessMapData
:
public std::binary_function< MapValueType const, MapValueType const, bool >
{

bool operator()(MapValueType const & lhs, MapValueType const & rhs) const
{
return lhs.second < rhs.second;
}

};

// a class for counting elements of an unknown or sparse range
class Count
{

// an unordered_map will be more efficient if available for your
// compiler
typedef std::map< int, std::size_t > AccumulatorType;

public:

void operator()(int i)
{
// increase the count for i
++counts_;
}

int maxElement() const
{
// max element returns an iterator to the entry with the
// largest data value. That is an iterator to the
// std::pair< int, std::size_t >(x, y) such that y is
// the largest such value in the map. The first element
// of the pair contains the value with that frequency.
return std::max_element(counts_.begin(), counts_.end(), LessMapData< AccumulatorType::value_type >())->first;
}

private:

AccumulatorType counts_;

};

int maxInt()
{
int number[] = {1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7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,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2,1,5,2,3,4,5,6,3,7,9,8,4,3,2,5,2,3,4,5,6,3,7,9,8,4,3,2
};
return std::for_each(number, number + (sizeof(number) / sizeof(number[0])), Count()).maxElement();
}


Σnigma

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!