An array which stores values with 2 indices

learn more… | top users | synonyms

0
votes
4answers
38 views

Given a 2D matrix of characters we have to check whether the given word exist in it or not

Given a 2D matrix of characters we have to check whether the given word exist in it or not. eg s f t d a h r y o we can find "rat in it (top down , straight ,diagonal or anypath).. even in ...
1
vote
4answers
64 views

c++ array[var][2] as a class member

I would like to have an array of unsigned integers within a class, and its size should be [var][2], so the user will be able to choose var in runtime. Is there a better way than allocating a two ...
1
vote
1answer
19 views

numpy: 1d histogram based on 2d-pixel euclidean distance from center

I am using python, with scipy, numpy, etc. I want to compute the histogram of intensity values of a grayscale image, based on the distance of the pixels to the center of mass of the image. The ...
0
votes
1answer
69 views

C Access 2D char array via Pointer

I am trying to access a 2D array of chars. I have a pointer on right address but somehow dreferencing is not working. char ary[5][8]; char temp[8]; int i; char **a_ptr = &ary; for(i=0; ...
0
votes
1answer
34 views

How can I write/save a 2 dimensional string to a textfile? C# windows form

when I use File.WriteAllLines it only accepts 1D arrays. right now, I just have: for (int x = 0; x < BookList_Array.Length; x++) { writer.WriteLine(BookList_Array); } with BookList_Array ...
0
votes
0answers
49 views

loading textfile in to two dimensional array C# GUI

So most things ive read about loading textfiles in windows form shows you loading it into a single dimension string array. but I have some features id like to do that would work much better if it were ...
-4
votes
0answers
40 views

Tic Tac Toe java program Errors [closed]

I am having trouble with the last three methods of my program in the Board.java. I'm not sure how to go get it to read gameBoard. It keeps giving me errors. I really cant figure out what I'm doing ...
-5
votes
1answer
74 views

tic tac toe java program [closed]

I am doing a project for a tic tac toe game. I am have A LOT of trouble with the last couple of classes to mark the players move, check if a player won and to reset the board. I know I have to use ...
1
vote
1answer
53 views

Pointer to statically defined two-dimensional array

Code (compiled using gcc -std=c99) ... #include <stdio.h> #include <stdlib.h> typedef int mytype[8][8]; int main(void) { mytype CB; for (int r=0; r<8; r++) { for (int ...
1
vote
2answers
50 views

mathplotlib imshow complex 2D array

Is there any good way how to plot 2D array of complex numbers as image in mathplotlib ? It makes very much sense to map magnitude of complex number as "brightness" or "saturation" and phase as "Hue" ...
1
vote
1answer
41 views

How to assign a pointer a 2D square array of unknown size?Whats wrong in the following function?

Here is the code I tried,Segmentation fault was the result.. void allocate(int ** universe,int n) // to assign pointer "a" a nXn matrix { universe=(int **) calloc(n,sizeof(int *)); ...
0
votes
1answer
35 views

2d array copy column and row and proof if the contains is equal to or not

I would like to proof whether there is a Float.POSITIVE_INFINITY in my j-th column and row. But I do not know how I can do this, by not having an exploding time complexity. This means I do not want to ...
0
votes
2answers
56 views

2D array operations using vector

I have been using vectors only lately and found them extremely handy when compared normal array declarations. however, I have dealt with only 1D operations as following:- vector<int>X; ...
2
votes
2answers
68 views

BlueJ 2d Dimensional Array

For my class assignment we need to Write a class called Matrix that contains a private 2-dimensional int array called 'matrix' that can be up to 10 rows by 10 columns maximum. We need to use two ...
0
votes
2answers
39 views

Dividing 2d array into all possible nxn squares

Spent hours on this allready(since im still learning), so maybe you guys could help. The problem is that i can't figure out the way how to divide a 2d array to all possible nxn squares. I am ...

1 2 3 4 5 39
15 30 50 per page