Questions tagged [n-dimensional]

n-dimensional involves computation in higher dimensions

Usually used in math,physics,machine learning and computer graphics. Its common to downgrade n-dimensional problems down to 4D/3D/2D/1D using techniques like:

  • projection
  • cross-section
  • PCA

either to lower the needed processing or storage power needed to handle it or to visualize or just to simplify.

110 questions
3
votes
0 answers

Farthest point from (potentially-overlapping) spheres

I am looking for a reasonably efficient algorithm (and likely associated data structure) to accomplish the following in a reasonably low dimension (d<10; generally d=2 or 3): Given a set of (potentially-overlapping!) spheres and a fixed bounding…
TLW
  • 1,373
  • 9
  • 22
3
votes
1 answer

Using scipy interpn with meshgrid on an n-dimensional array

I am trying to translate a Matlab "interpn" interpolation of a large, 4D array, but formulations diverge significantly between Matlab and Python. There's a good question/answer from several years ago here that I've been trying to work with. I think…
3
votes
1 answer

Finding coordinate of rectangle in n-dimension

What is the best way in C++ to calculate the coordinate of a rectangle (hyper-rectangle) in n-dimension? I have dimensions definition of the rectangle in a 1d vector like: [min1, max1, min2, max2, ...., minN, maxN] For example, in 2d the…
zaza
  • 365
  • 2
  • 7
3
votes
3 answers

C++ 2D vector and operations

How can one create a 2D vector in C++ and find its length and coordinates? In this case, how are the vector elements filled with values? Thanks.
Simplicity
  • 47,404
  • 98
  • 256
  • 385
3
votes
2 answers

Matlab/Octave: how to write n-dimensional zero padding algorithm without eval

I would like to write a "syntactical sugar" Octave or Matlab zero-padding function, to which the user sends an n-dimensional object and a vector of <= n entries. The vector contains new, equal or larger dimensions for the object, and the object is…
barnhillec
  • 346
  • 1
  • 5
  • 15
3
votes
2 answers

Find n nearest points with Solr in multi-dimensional space

Solr experts, I'd really appreciate some advice on my problem. I want to build a multi-dimensional space using Solr, let's say with 5 dimensions. In this space, there should be points, e.g. P1 (0.3, 0.3, 0.3, 0.3, 0.3) P2 (0.5, 0.5, 0.5, 0.5,…
theb
  • 117
  • 9
3
votes
2 answers

Sort and keep index of a n-dimension array -- MATLAB

I have a 12-D array and am using each dimension as an index value in an optimization problem. A(:,:,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10) each index value i is a value from 1 to 5. I want to sort A from greatest to least and keep track of the indices so…
Oliver Oliver
  • 2,057
  • 4
  • 16
  • 14
3
votes
1 answer

Multi Attribute Matching of Profiles

I am trying to solve a problem of a dating site. Here is the problem Each user of app will have some attributes - like the books he reads, movies he watches, music, TV show etc. These are defined top level attribute categories. Each of these…
Thoughtful Monkey
  • 648
  • 2
  • 10
  • 24
2
votes
2 answers

How to find the center and radius of an any-dimensional sphere given dims+1 points

Given a vector of N-dimensional points. The vector will be of size N+1. Is there a generalized algorithm to find the center and radius of the ND sphere using those points where the sphere intersects every single one of those points?
Christian__
  • 119
  • 1
  • 9
2
votes
3 answers

Optimally selecting n datapoints from k

Problem statement: I have 32k strings that consist of 13 characters. Each character can take 3 values (a, b or c). I need to select n strings from the 32k that satisfy the following: select minimal number of strings so that the selected strings are…
PeterP
  • 21
  • 4
2
votes
2 answers

Iterate throught n-dimensional vector c++

I wanted to write my own code to iterate over an n dimensional vector (where the dimension is known). Here is the code: void printing(const auto& i, const int dimension){ int k= dimension; for(const auto& j: i){ if(k>1){ …
2
votes
1 answer

Performing OpenCV k-means on data from csv-file

I am trying to read a time-series from a csv-file. Each row contains 256 (may vary in the future) elements I want to handle as a point in 256-dimensional space. Then I want to perform k-means-clustering on it to find the most k significant…
2
votes
2 answers

comparing values in numpy array of n-dimension

Need to compare each value inside a numpy array and return 1 to the largest value and 0 to the others. I am having problem with different numbers of []. Input Example: [[[0.6673975 0.33333233]] . . . [[0.33260247 0.6673975]]] Expected Output: [[[1…
Eduardo Andrade
  • 111
  • 1
  • 1
  • 13
2
votes
3 answers

C++ private class dynamic n-dimensional array

I've been looking all around StackOverlow for an answer but i didn't find one so i hope it isn't duplication of any post around here. so, i have the next problem. lets say i have the next 2 classes: Rectangle (Which is built from another class but…
Itay.V
  • 169
  • 1
  • 7
2
votes
1 answer

Is there a function for computing the N-dimensional convex hull in Julia?

Does such a function exist yet? If so, where can I find it? Basically, I'm looking for the equivalent of Matlab's convhulln() function. It takes as its input a data set (with N dimensions) and returns the data points that belong to the convex hull…
Zack
  • 181
  • 1
  • 11