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

SQL Server - Create cartesian product from comma delimited column

I need to turn Key Location 123456 UK,France,Italy into Key Location 123456 UK 123456 France 123456 Italy Any ideas? Thanks
Paul
  • 9
  • 2
0
votes
1 answer

NHIbernate 1.2 And Lazy Loading

Got a bit of an unusual problem - i'm sure i'm missing something really simple now! Have two tables in particular:
TheITGuy
  • 722
  • 4
  • 15
0
votes
3 answers

Cartesian product with generators

This is linked to Cartesian product of nested dictionaries of lists Suppose I have a nested dict with lists representing multiple configurations, like: {'algorithm': ['PPO', 'A2C', 'DQN'], 'env_config': {'env': 'GymEnvWrapper-Atari', 'env_config':…
0
votes
2 answers

Form a multidimensional cartesian product array

I have a function that generates a cartesian product for me var abcArray = new string[] { "a", "b", "c" }; var xyzArray = new string[] { "1", "2", "3" }; var combos = CartesianProductSmart(abcArray, xyzArray); private…
0
votes
1 answer

Expand Map[String,List[String]] into Cartesian Product in Scala

I'm looking for a version of Expand a Set[Set[String]] into Cartesian Product in Scala based on map type : I would like to start with : val values = Map( "id" -> List("Paul","Joe"), "number" -> List("1","2","3"), "Type" ->…
Wilson Wii
  • 91
  • 1
  • 6
0
votes
1 answer

Converting Cartesian Coordinates To Polar Coordinates

I'm trying to covert an image from Polar Coordinates to Cartesian Coordinates but after applying the formulas I get float coordinates (r and teta) and I don't know how to represent the points in space using floats for x and y. There might be a way…
0
votes
1 answer

Specific value of one quadrant python

I would like to know how could I get the total value of the first quadrant: aa = { (0, 1) : 4, (2, 2) : 6, (3, 1) : 7, (1, 2) : 10, (3, 2) : 11,(0, -5) : 4, (-2, -2) : 6, (-3, 1) : 7, (1, -2) : 10, (-3, 2) : 11 } values = aa.values() total =…
notsara
  • 25
  • 5
0
votes
1 answer

Android Anychart Cartesian showing 2 vertical bars for a single item

Am using the android anychart library to draw a cartesian using the data i have provided. However, the cartesian appears with 2 vertical bars for each item instead of only one bar (Like indicated for the product "Pe" in the Image).. The Image I have…
willy
  • 101
  • 1
  • 9
0
votes
1 answer

Find distance between two points in scatter plot

I want to find the distance between two points on a scatter plot. For clarification see the image: Scatter Plot The challenge is to identify the points using an algorithm (as I want to automate it as much as possible), the rest is just getting…
Sumit Mann
  • 11
  • 3
0
votes
1 answer

Astronomy RA and DEC to cartesian coordinates then plot in a 2D image FOV

I would like to create an artificial image which simulates the capture of a camera https://www.theimagingsource.com/products/industrial-cameras/usb-2.0-monochrome/dmk41bu02h/ and the lens…
Iris G.
  • 433
  • 1
  • 6
  • 15
0
votes
1 answer

How to Cartesian product object array like this

Update How to cartesian product object array like this, and dynamic data if have 3 properties and output like below const property = [ { name: 'color', list: [ { title: 'red', priceIncrease: 2, weightIncrease: 0 }, { title:…
Aqlx
  • 1
  • 1
0
votes
1 answer

jaccard similarity using cartesian

I have this piece of code: StructType schema = new StructType( new StructField[] { DataTypes.createStructField("file_path", DataTypes.StringType, false), DataTypes.createStructField("file_content", …
notsure
  • 15
  • 4
0
votes
3 answers

Get combination of all elements in JavaScript Object

I'm trying to write a program that generates every single item based on my JSON structure and giving each combination an individual number. I found a function on here that so far does its job listing out every combination for me, however I cannot…
0
votes
2 answers

Do you inherit an object of super class in base class when you inherit it?

I have this class which basically represents a point in X-Y plane and has this function to calculate distance between two Point Objects: double dist(2DPoint p){ return Math.sqrt(Math.pow(x-p.x, 2) + Math.pow(y-p.y, 2)); } I now want to create a…
APE
  • 37
  • 4
0
votes
3 answers

Triangle from cartesian coordinates

I'm newbie. I have a class Triangle which receives 3 list variables with format [x, y]: a, b and c. How can I return the string with the triangle's cartesian points? class Triangle(): def __init__(self, a, b, c): """ …
user13549165