Questions tagged [data-structures]
Questions on using or implementing more or less common data structures such as linked lists, structs, trees, tries, heaps etc. in Mathematica.
198
questions
0
votes
0
answers
51
views
Speed up the evaluation process
I am writing a code to simulate some spins. Following is the main part of the code:
...
0
votes
1
answer
105
views
Need explanation on data[[i]][[1]]
I am trying to train a physics model and then check its profile. For this model, data for physics model is defined with:
...
0
votes
2
answers
60
views
Interpolation function for data with repeating independent variable
I want to find an interpolation function for data in which the x-variable is repeated (example below). The repetition in data is natural and cannot not be eliminated.
Can I somehow use ...
7
votes
0
answers
109
views
DataStructure's "DynamicArray" underperforms Association?
The documentation for DynamicArray states that it is "An extensible array is useful for continuously appending elements, as well as for efficient element extraction and updating."
I tried a ...
1
vote
2
answers
74
views
Contour plot data extraction and replacing z slices with user defined function
Let's say we have a contour plot of the following,
ContourPlot[Cos[x] + Cos[y], {x, 0, Pi}, {y, 0, Pi},
ContourLabels -> True]
that gives,
we can extract the ...
0
votes
0
answers
62
views
Long associations of short associations or the inverse, which one should I use?
I don't have enough experiences of using Association or Dataset, and when operating with nested associations I meet the ...
2
votes
1
answer
90
views
How can I join non-overlapping TimeSeries so that the gap between any two is considered to be Missing data?
I have a set of time series sampled at one second intervals.
For example,
...
0
votes
1
answer
77
views
List structure for plotting multiple y-values (with gaps on certain dates) using DateListPlot
I would like to set up a list like this
data = {{Date1,y1,y2,y3,y4,y5,y6},{Date2,y1,y2,y3,y4,y5,y6},...}
and then use DateListPlot to create various plots, e.g. y1 ...
3
votes
1
answer
72
views
Question on splitting into individual cycle from a list of 30 cycles dataset
Hi I have a set of data and will like to find out I can split these 30 cycles into each individual cycle? Do I use the for loop function in this application. Thanks for the help in advance.
...
0
votes
1
answer
263
views
How to rotate matrix? [closed]
Consider the matrix 'm1' :
m1 = RandomReal[{0, 1}, {100, 100}];
The question is, how to rotate the 'm1' data 45 degrees and extract the matrix 'm2' from it (shown ...
1
vote
1
answer
78
views
selecting specific part of data set [closed]
I have data set in form {section, Arcangale ,X,Y, type}. Section is the number between 1 to 3 (1,2,3), Arcangale is number change from 0 to 1 something like this (0.0176575), x and y are coordinate (...
0
votes
0
answers
68
views
Heap.m data structure package in Mathematica (Book: Computer Science with Mathematica, CUP press)
The CUP press book Computer Science with Mathematica discusses heaps in section 8.4.3.
The package Heap.m is mentioned (for import), containing functions such as HeapPlot.
Can you advise where to find ...
2
votes
1
answer
153
views
How to convert a dataset into an alternative format
I have the following dataset:
...
19
votes
3
answers
711
views
Difference between HashTable datastructure and Association datastructure
Is there a difference in the runtimes between CreateDataStructure["HashTable"] and <||> in terms of inserting, ...
7
votes
0
answers
238
views
Mutable objects in Wolfram Language
I've seen some posts about mutable objects in WL and some implementations:
Once more on object orientation in Mathematica: does it have to be so hard?
Immutability, Association and typing
Code ...