Questions tagged [cartesian]

Don't use this tag. If you have questions about cartesian products (e.g. SQL, Spark, Datatables, heterogeneous tuples), use `cartesian-product` tag. If you have questions about planar geometry / 3D-graphics, use `cartesian-coordinates` tag.

245 questions
0
votes
1 answer

Selecting Columns from 3 Inner Joins - still getting cartesian product. S

I have 3 tables. They are inner joined. When I choose to select from all three tables I get a cartesian product. I've used distinct and I've tried cross apply with top 1. Top 1 brings back the right amount of records but it repeats the fields used…
0
votes
2 answers

More efficient way of finding every possible combination

this is a bit tough for me to explain, I'm trying to get every possible combination of numbers while only using the numbers all together once, for example, if I have the numbers 1 through 10 and want the unique combinations in groups of…
Neostim
  • 71
  • 1
  • 8
0
votes
0 answers

Join unrelated tables by prompting for related value

I have two unrelated tables, Activity and Schedules, in an oracle database using Business Objects to query. I can pair up any activity with any schedule but I want it to be prompted in the query. The tables are as follows: Activity_Name …
cjweitz
  • 33
  • 2
  • 9
0
votes
3 answers

Ambiguity between i, j indices and x, y coordinates when dealing with 2D arrays

Background: I am having a discussion with a friend regarding the correct way to refer to elements within a 2D array for something I'm designing. I was unhappy with using XNA's Point and Vector2 structs as array references because the properties of…
Joe Shanahan
  • 816
  • 5
  • 21
0
votes
1 answer

How to find whether a certain index lies on diagonal or anti diagonal of a matrix?

So I am currently working on a project that involves a parallel grid structure. The problem I am having is related to the communication scheme. The amount of information I have for each element in this matrix is what processor rank it is. This lets…
Muttonchop
  • 353
  • 4
  • 22
-1
votes
2 answers

Does Cross Join not work between two different tables with same column name?

As written on the title, does CROSS JOIN not work for different tables with the same column name? For example, I have one table named Fruits: | name | price | | apple | 1 | | banana | 2 | and another table named Snacks: | name |…
-1
votes
1 answer

Cartesian Product of n-sets in C

I am writing a C program that should print the Cartesian product of n sets, where the elements of each set are the line of text in one file, and the names of the n files are passed as command-line arguments. So far I managed to read every line into…
-1
votes
1 answer

Generate Cartesian Product using more than two lists on GPU

I would like to know how to generate a Cartesian product of more than two lists using CUDA. How do I make this code work with three or more lists? It works with two lists but not with three, I tried /, % without success. Its basic. #include…
-1
votes
1 answer

Looping through lists to create a cartesian product by row pandas

I'd like to expand my rows by their cross product across multiple lists. The current logic I use is: list = [['Yes', 'No', 'Maybe'], ['Yes', 'No', 'Maybe']] index = pd.MultiIndex.from_product(list, names = ["column1", "column2"]) …
Fust
  • 19
  • 7
-1
votes
1 answer

SPARQL : Test an existing predicate in list of values generate cartesian product

I am trying to test an existing relation (objectpropertie) for a given resource. Let's take an exemple : I would like to know if a subject ?a has a predicate with one of values in a sparql variable ?b. So ?a can contains an uuid (or what you want…
A.Dumas
  • 63
  • 1
  • 5
-1
votes
1 answer

How to eliminate certain numbers in a series by C++?

I'm trying to eliminate some number from range (170-2500) and then calculate the remaining numbers after the elimination. The numbers composed of 3 digits from number's list (2,5,6,7). I have tried using Cartesian Product to generate the numbers,…
jowwyss79
  • 33
  • 6
-1
votes
1 answer

Can I add “labels” to a set of Cartesian coordinates for easier readout?

I have a circular series of 250 Cartesian coordinates that are all equidistant from one another (essentially 250 equally spaced points making up a 360 degree circle), and I’d like to create a program (python, preferably) that assigns a label to each…
-1
votes
1 answer

Get individual items of LINQ Cartesian Product

var A = new[] {A, B}; var B = new[] {X, Y, Z}; var Product = from _A in A from _B in B select new[] { _A, _B }; //Intent below: foreach (pair in…
AndyBernard
  • 105
  • 1
  • 9
-1
votes
2 answers

Area of a triangle in a cartesian plane

I am trying to make a program that makes the user input a pairs of xy coordinates. The program must use the three farthest points from (0,0) as the vertices of the triangle. The program must output the area of the triangle. I know the formula for it…
-1
votes
1 answer

Spark Unique pair in cartesian product

I have this: In [1]:a = sc.parallelize([a,b,c]) In [2]:a.cartesian(a).collect() Out[3]: [(a, a), (a, b), (a, c), (b, a), (c, a), (b, b), (b, c), (c, b), (c, c)] I want the following result: In [1]:a = sc.parallelize([1,2,3]) In…
GwydionFR
  • 787
  • 1
  • 10
  • 25
1 2 3
16
17