In mathematics, a matrix (plural matrices) is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. The individual items in a matrix are called its elements or entries.
0
votes
0answers
2 views
Weihted Finite Automata in C++
I want to work with Weighted Finite Automata in C++, add / delete transitions with weights(a,b) .. what is the most appropriate library with which I can work, and where can I find examples?
Thank you ...
1
vote
0answers
7 views
Is this function row-major?
I've been staring at this stuff so long my head is in a blurred daze but I think I'm getting it. I'm using a matrix library, and a matrix has its data stored as:
struct Matrix4{
vec4 x;
vec4 ...
1
vote
2answers
35 views
PHP code-golf rotate matrix counter-clockwise
I am solving a larger code-golf problem and at one step I need to rotate a 2D array counter-clockwise.
So if I have this matrix:
1 2 3 4
1 2 3 4
3 4 5 6
3 4 5 6
After the rotation it will be:
4 4 ...
0
votes
0answers
4 views
column groups by child record ordinal
I've created a matrix in a SRS report with one row group (OrderID) and one column group (ProductID), where the column group represents the child records to the parent record of the row group. Each row ...
-7
votes
1answer
37 views
Why it is not possible to index result of a function directly in Matlab? [closed]
Suppose I have some function which returns matrix. Let it be size function, but this is just an example.
>> size(lab)
ans =
1998 1999 3
so I can do
>> ...
2
votes
0answers
29 views
Given a matrix, how to find the best cell for each row, without repetition
I have a matrix, the rows are objects, and the columns are objectives, each row represents the distance from an object to an objective.
For example, lets consider I have 3 objects O1 O2 O3, and 3 ...
1
vote
0answers
105 views
Handling more than 10 billion cells of data
I need to write a program in python that needs to analyze more than 100 MB of data and save it as a matrix of dimensions 100111 * 100111. What should I use? The cells need to hold integer values.
1
vote
4answers
65 views
Extract line or column from PHP array
I have a bidimensional PHP array (matrix).
Is there anyway to extract (echo or save into another variable) a line or a column from this matrix without iterating through the elements?
Suppose we have ...
1
vote
3answers
35 views
sorting a 2D double array
I try to sort a 2D double array (double[][]) on the first value.
example: {1.0226342823592962,0.0}, {1.0395582845873155,1.0}
starting with the biggest value.
This is the code I use (java generated ...
3
votes
2answers
94 views
Why are these computation speeds different for multi-dimensional array in C++? [duplicate]
This might be a repeat question. So, please feel free to flag it down if you want.
In C++, I learnt that array dimensions are stored consecutively in memory How are 3D arrays stored in C? so i did a ...
1
vote
2answers
25 views
Isabelle: proof for a equality of transposed matrix with a constant factor
I am facing problems with the following lemma, which I think should be correct. I can get the proof to work up to a certain point with small steps, however I haven't found a way to proof the entire ...
0
votes
0answers
16 views
OpenGL ES 2.0 - Rotating a batch of quads
Background
In my app I use the following code to rotate my quad:
Code
//Rotate the quad
Matrix.setIdentityM(mRotationMatrix, 0);
Matrix.translateM(mRotationMatrix, 0, centreX, centreY, 0f);
...
0
votes
3answers
37 views
out of memory error when using diag function in matlab
I have an array of valued double M where size(M)=15000
I need to convert this array to a diagonal matrix with command diag(M)
but i get the famous error out of memory
I run matlab with option ...
0
votes
0answers
21 views
covert the pairwise data to a matrix
I have a similar question to the following poster:
In Python: create a table to visualize pairwise data
but my data missed lots of pairwise information.
so if I use a similar implementation as in ...
0
votes
0answers
17 views
Given vertex locations before and after an arbitrary 3D rotation, determine the rotation
I'd like to solve this for all cases in general, but am unsure of the best approach for even one example. An object comprised of 4 vertices is rotated arbitrarily in 3D space. You have the vertex ...