sparse-array Questions
8
Solved
Are there any well-known libraries in Java for sparse bit vectors?
(And are there guidelines for how sparse is useful to use them vs. java.util.BitSet?)
Inoculate asked 14/6, 2010 at 20:57
5
Solved
I was implementing a Bitmap cache using a HashMap<Integer, Bitmap> and received the following warning in Eclipse:
Use new SparseArray(...) instead for better performance.
I've never hear...
Grave asked 15/9, 2012 at 22:22
5
Solved
(There are some questions about time-efficient sparse arrays but I am looking for memory efficiency.)
I need the equivalent of a List<T> or Map<Integer,T> which
Can grow on demand ju...
Popper asked 27/9, 2012 at 16:39
8
When a config change happens, my ListView Checkbox states get lost, which I understand why.
I try to implement
public void onSaveInstanceState(final Bundle outState)
in one of my Fragments. So ...
Twibill asked 29/6, 2012 at 23:29
2
Solved
I have a sparse array whose contents aren't guaranteed to be inserted in index order but need to be iterated through in index order. To iterate through a sparse array I understand that you need to ...
Pandybat asked 22/12, 2014 at 7:29
4
Solved
I need to use a hashmap to store key / values in my Android app (potentially thousands), but I understand that I should be using SparseArray in order to save memory. However, my key needs to be a S...
Loram asked 19/7, 2014 at 4:24
3
Solved
How can I initialize a static, unmodifiable instance of android.util.SparseArray?
Oxymoron asked 5/5, 2013 at 23:0
3
I have a sparse array a (mostly zeroes):
unsigned char a[1000000];
and I would like to create an array b of indexes to non-zero elements of a using SIMD instructions on Intel x64 architecture w...
Hydropic asked 24/9, 2013 at 1:9
6
Solved
I have an array of elements where the entries are sparse. How can I easily condense the sparse array into a dense array so that I don't have to keep checking for null and undefined values every tim...
Cathycathyleen asked 25/7, 2012 at 23:16
7
Solved
I have an array of objects in javascript. I use jquery.
How do i get the first element in the array? I cant use the array index - as I assign each elements index when I am adding the objects to th...
Seafarer asked 25/8, 2010 at 23:3
4
Solved
What is the best method to sort a sparse array and keep the elements on the same indexes?
For example:
a[0] = 3,
a[1] = 2,
a[2] = 6,
a[7] = 4,
a[8] = 5,
I would like after the sort to have
...
Hire asked 27/8, 2012 at 7:16
1
Solved
What is the main difference between calling remove() or delete() on a SparseArray, because they both accept key's as arguments.
Thanks.
Leoni asked 16/8, 2015 at 20:41
2
Solved
I have written a small program that produces arrays, which runs quite long (almost forever ;-)):
var results = [];
var i = 1;
while (true) {
console.log(i++);
results.push([]);
}
When, instea...
Stannfield asked 23/4, 2015 at 6:1
3
I am trying load a sparse array that I have previously saved. Saving the sparse array was easy enough. Trying to read it though is a pain. scipy.load returns a 0d array around my sparse array.
imp...
Swearword asked 8/6, 2011 at 16:57
3
Solved
I need to store a 512^3 array on disk in some way and I'm currently using HDF5. Since the array is sparse a lot of disk space gets wasted.
Does HDF5 provide any support for sparse array ?
Anschluss asked 23/8, 2010 at 7:4
2
Solved
It seems numpy's einsum function does not work with scipy.sparse matrices. Are there alternatives to do the sorts of things einsum can do with sparse matrices?
In response to @eickenberg's answer:...
Transparent asked 27/4, 2014 at 11:33
7
Solved
I'm working on a project, written in Java, which requires that I build a very large 2-D sparse array. Very sparse, if that makes a difference. Anyway: the most crucial aspect for this application i...
Centrosymmetric asked 23/12, 2008 at 21:55
1
Solved
I have a sparse array of values which I want to populate in a Spinner, and when the item is selected, I want to get the id (which is the key from the sparse array).
What is the preferred way of c...
Igor asked 10/2, 2014 at 12:56
1
Why aren't there any multidimensional sparse matrices/arrays in Julia? Why can we only have 2D sparse matrices and not for example 3D sparse matrices (or arrays)?
Celandine asked 5/2, 2014 at 23:38
2
Solved
I have a SparseArray<myObject> and want to store it in bundle in onSaveInstanceState method in my activity and restore it in oncreate. I found putSparseParcelableArray method for put SparseAr...
Mitchmitchael asked 15/2, 2013 at 17:5
1
Solved
I have an application that involves large n-dimensional arrays which are very sparse. scipy.sparse has a useful 'vectorized getting and setting' feature, so that Cython can be used to populate a sp...
Mcglynn asked 21/11, 2013 at 6:44
3
For example,
A = [ -1 0 -2 0 0
2 8 0 1 0
0 0 3 0 -2
0 -3 2 0 0
1 2 0 0 -4];
how can I get a vector of the first nonzero elements of each row?
Gold asked 27/10, 2013 at 23:11
3
I'm using a list of unique int ids against a list of user names as a fast lookup table and decided to use the sparseArray but I would like to be able print to log the entire list from time to time ...
Walkup asked 5/9, 2011 at 6:50
3
Suppose I have two very large lists {a1, a2, …} and {b1, b2, …} where all ai and bj are large sparse arrays. For the sake of memory efficiency I store each list as one comprehensive sparse array.
...
Gerrard asked 21/12, 2011 at 20:47
4
Solved
I've got the following situation:
var large = [a,b,c,d,e,f,g,h,i];
var small = [a2, b2, c2, null, null, null, null, null, null, i2];
where every element of both arrays is an object.
The small a...
Mandell asked 27/6, 2011 at 21:51
1 Next >
© 2022 - 2024 — McMap. All rights reserved.