Skip to main content
Advice
1 vote
6 replies
145 views

I’m an undergraduate CS student working on a final project due in about a month, and I’m trying to design and implement a C++-based AI Neural Network Simulator integrated into a small game environment....
Wasthisit's user avatar
-2 votes
3 answers
237 views

Background I am developing an R program that hierarchically tabulates data in the command line. In the spirit of cli and its box-styles, I have created a nested list with the appropriate box-drawing ...
Greg's user avatar
  • 3,583
4 votes
3 answers
159 views

I wish to efficiently extract values from a matrix (vals), using a single column number (val_col) and a matrix of row numbers (val_rows). Specifically, I also want my results in a matrix ...
Greg's user avatar
  • 3,583
0 votes
0 answers
27 views

I'm processing factor data. The raw table is in long format (ticker + date + factor_val), and some tickers are missing on certain dates (e.g. trading halts). I use pivot by to reshape it into a wide ...
haru's user avatar
  • 41
Best practices
1 vote
4 replies
140 views

Question What is the most efficient way of dynamically appending a single row to a matrix, when the dimensions are not known ahead of time? Ideally we modify "in-place" rather than re-...
Greg's user avatar
  • 3,583
4 votes
0 answers
231 views

Upper Hessenberg forms are used in eigenvalue computation. I wrote the following code that transforms a square matrix to its upper Hessenberg form using an algorithm described in this video. #define d ...
uran42's user avatar
  • 775
0 votes
1 answer
45 views

I currently have an index matrix that I want to convert into a data table, and store the corresponding indices as fields in the data table. I tried using the table() function to achieve this, but when ...
haru's user avatar
  • 41
8 votes
5 answers
912 views

For a given vector like v <- c(1,3,7,2,5), I want to create a matrix that repeats that vector with every possible offset, like this: NA NA NA NA 1 NA NA NA 1 3 NA NA 1 3 7 NA 1 3 7 2 1 ...
Chris McElroy's user avatar
3 votes
1 answer
159 views

I want to find the eigenvalues of a symmetric matrix. When I do this in Python, I get an unbalanced diagonal matrix. The value of [0, 0] is much larger than the other eigenvalues. Is it wrong? How ...
Another.Chemist's user avatar
Advice
0 votes
1 replies
60 views

I'm trying to run some leslie matrix simulations for a project I'm currently working on. Basically, I'm trying to investigate the effects of different harvesting regimes on a population by creating a ...
Jacob Ouellette's user avatar
4 votes
3 answers
286 views

Matrices can be triangulated using less than ten lines of code in C, I have heard being said. But LU decomposition method needs to be used, instead of Cramer's rule. So, I was trying to do that. My ...
uran42's user avatar
  • 775
3 votes
2 answers
163 views

In a boolean matrix there are patterns of connected cells filled with "1". The rest is filled with "0". The goal is to get a list of cells with the red "1"s - see image ...
stot's user avatar
  • 1,183
Best practices
2 votes
6 replies
247 views

Suppose I have a C-style matrix of elements typedef struct _RAW_DATA{ int a; int b; }RAW_DATA; inside a templated class, that defines the size of the matrix: template<size_t TDim> ...
user2281752's user avatar
1 vote
1 answer
125 views

Summary Using the Eigen library, I see significantly different numbers of BiCGStab iterations when I solve Ax = b with a right-preconditioner, i.e., [A M^(-1)] Mx = b, (a) by precomputing A M^(-1) ...
josh_eime's user avatar
  • 308
1 vote
1 answer
164 views

I want to achieve a transformation on the canvas using two fingers for rotation, scaling, and translation, while using one finger to paint in the correct position. What I have so far: import 'package:...
WSMA's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
2748