Questions tagged [matrix]
The matrix tag has no summary.
15 questions
1
vote
3
answers
826
views
Memory on multiple cores versus 1 core
I am running a program that, among other things, does some matrix multiplications, singular value decompositions and accessing matrix subsets on a very large data set (these are the lines of code that ...
4
votes
3
answers
3k
views
What is the most effective algorithm to evenly distribute n points on a 2 dimensional array so they are as separated as possible?
I am trying to code a game which currently uses a matrix ( that I am calling a map). On this map are islands which can be generated n times. The purpose of the algorithm is to distribute the islands ...
5
votes
5
answers
872
views
How to measure the solution level of an unsolved Rubik's Cube?
I am trying to figure out how to measure the relative success level of a given (but unsolved!) Rubik's Cube state. My first idea was to calculate the number of overlapping "cells" in the destination (...
2
votes
3
answers
347
views
What Behavior would most users expect from a "Row Iterator" and a "Column Iterator"?
Let's say I have a Matrix class I've already implemented.
Matrix<float> mat(30, 30);
for(size_t row = 0; row < mat.rows(); row++) {//Assume Row-Major ordering for performance reasons
for(...
-1
votes
1
answer
146
views
Aligning text columns of different size and content
In a past posting, I asked about commands in Bash to align text columns against one another by row. It has become clear to me that the desired task (i.e., aligning text columns of different size and ...
-1
votes
1
answer
206
views
Rotate a matrix in place, moving elements? (How to write a part of flow/logic after understanding the problem?)
Following is a java solution of the classic question of rotating a nxn matrix in place clockwise by 90 degrees.
public void rotate(int[][] matrix, int n) {
for (int layer = 0; layer < n / 2; ++...
1
vote
2
answers
263
views
Place X items in N matrices without repeat column and row
I have N matrices (n × m) and items to place in each one (n · m). The same items are repeated randomly for each matrix. When one item is placed in (i, j), for the following matrices the ...
24
votes
3
answers
6k
views
How did Strassen come up with his matrix multiplication method?
The famous Strassen's matrix multiplication algorithm is a real treat for us, as it reduces the time complexity from the traditional O(n3) to O(n2.8).
But of all the resources I have gone through, ...