I am new to java world with C ++ background. I would like to port some C ++ code to Java. The code uses Sparse vectors:
struct Feature{
int index;
double value;
};
typedef std::vector<Feature> featvec_t;
As I understand it, if someone creates an object, there will be some overhead for using memory. Thus, the naive implementation of Feature will be significant if there are 10-100 million functions in the featvec_t suite.
How to efficiently represent this memory structure in Java?
source
share