Questions tagged [data-representation]
177 questions
3
votes
4 answers
What is the name of a data structure looking like bowling pins?
First of all, sorry for the title. Someone please propose a better one, I really didn't know how to express my question properly.
Basically, I'm just looking for the name of a data structure where the elements look like this (ignore the…

Jesse Emond
- 7,180
- 7
- 32
- 37
3
votes
1 answer
Creating a 'thermal image' using data points
I am looking for a way to represent some data points into a 'thermal map' (500x500).
Data array:
"data": [
{
"x": 120,
"y": 350,
"temperature": 90
},
{
"x": 300,
"y": 210,
"temperature": 35
…

Laurent
- 1,292
- 4
- 23
- 47
3
votes
2 answers
Efficient data interchange format using only C-style fprintf() statements?
I need to transfer the very large dataset (between 1-10 mil records, possibly much more) from a domain-specific language (whose sole output mechanism is a C-style fprintf statement) to Python.
Currently, I'm using the DSL's fprintf to write records…

Gilead
- 1,263
- 10
- 21
2
votes
6 answers
How to represent data that may not be set
I have a class containing a number of properties, something like:
public class Update
{
public int Quantity { get; set; }
public decimal Price { get; set; }
public string Name { get; set; }
}
Each instance of Update does not necessarily…

RichK
- 11,318
- 6
- 35
- 49
2
votes
1 answer
Is transmuting (T, ()) to T safe?
I am implementing an alternative to a BTreeMap. On top of this I'm building a BTreeSet, which is a wrapper around type MyBTreeSetContents = MyBTreeMap.
Internally, leaf nodes of this BTree contain a Vec<(K, V)> of values.
In the case…

Qqwy
- 5,214
- 5
- 42
- 83
2
votes
0 answers
What's the need for different ways to represent data using the binary system?
There are many ways to represent data using binary like - unsigned, signed magnitude, 1s/2s complement, offset-M,
floating-point, ASCII, and Unicode. Why do we need so many different ways?

sunny
- 149
- 8
2
votes
0 answers
Parallelize matplotlib.animation when running .to_html5_video()
I was wondering whether there is a straight-forward way to parallelize the method animation.FuncAnimation.to_html5_video() which takes a lot of time. While running it only uses 1 of my cpu's cores at a given time and I am guessing the process should…

shnnnms
- 31
- 3
2
votes
1 answer
Little Endian vs. Big Endian architectures
I've a question it is a kind of disagreement with a university professor, about Endianness, So I did not find any mean to solve this and find the right answer but asking and open a discussion in Stack Overflow community.
Let's say that we have this…

Omar Ghannou
- 557
- 4
- 9
2
votes
1 answer
How to plot the distribution of two variable(meter & height) for two different scenario?
I have two data frames which represent two scenarios. Each dataframe have 3 variables: Area, Height and Scenario_Name(scenario 1 and scenario 2).
What I want:
I want to show how much Suitable_Area do I have at each Height for
the two scenario.
I…

m_rub
- 31
- 6
2
votes
1 answer
Confusion about data types, compilers, hardware data representation and static vs dynamic typing
I am trying to understand static vs dynamic typing, but am really struggling to see how everything fits together.
It all starts with data types. As far as I understand, data types are quite abstract notions, which exist 'in' compilers in order to…

Lord Cat
- 401
- 4
- 13
2
votes
1 answer
Polymorphic Data Translation/Conversion Design Pattern
The problem is as follows:
consider the following class
class data : public base_data
{
public:
int a;
std::string b;
double c;
... // many other members
};
Assume it makes perfect sense to expose the data members of this…

Omri Bashari
- 41
- 2
2
votes
2 answers
What is the maximum and minimum values can be represented with 5-digit number? in 2's complement representation
What is the maximum and minimum values can be represented with 5-digit number that is assuming 2's complement representation?
do I find the the min and maximum value of 5-digit numbers, which are 00000 and I'm not sure what the max is. Then convert…

me sung
- 73
- 1
- 2
- 8
2
votes
3 answers
Numerically representing Nominal Data whilst retaining data semantics
I have a dataset of nominal and numerical features. I want to be able to represent this dataset entirely numerically if possible.
Ideally I would be able to do this for an n-ary nominal feature. I realize that in the binary case, one could represent…

Jack H
- 2,440
- 4
- 40
- 63
2
votes
3 answers
Algorithm to write two's complement integer in memory portably
Say I have the following:
int32 a = ...; // value of variable irrelevant; can be negative
unsigned char *buf = malloc(4); /* assuming octet bytes, this is just big
enough to hold an int32 */
Is there an efficient and…

Ricky Stewart
- 1,102
- 1
- 8
- 18
2
votes
1 answer
How can I deal with multiple values in some attribute?
I'm using WEKA tool for clustering data analysis, however in some of my attributes, there are many values within the domain. Specifically, I need to represent some information about proteins and the information that I need to include is the terms…

Marcos Abraão
- 21
- 1