Questions tagged [symmetry]

is used in its general meaning, from symmetric matrices to Git. As a result you should probably use at least one more tag to describe your case better.

78 questions
4
votes
1 answer

Minimum amount of numbers to change inside of n*n matrix to make it symmetrical about multiple lines at once

There is a n*n matrix made of numbers 0 - 9. For example: 6 0 0 8 9 6 1 5 1 6 8 1 1 0 4 2 1 3 7 1 5 8 8 6 6 2 5 2 7 9 4 6 9 6 4 1 4 7 8 5 3 8 9 4 8 3 9 2 9 I need to find the minimum amount of numbers to change (inside the matrix) to make it…
Too_Short
  • 51
  • 1
  • 5
4
votes
2 answers

Force symmetry for a TensorFlow conv2d kernel

I'd like to enforce symmetry in the weights within a Variable. I really want an approximate circular symmetry. However, I could imagine either row or column enforced symmetry. The goal is to reduce training time by reducing the number of free…
Robert Lugg
  • 1,090
  • 2
  • 12
  • 40
4
votes
3 answers

How to detect symmetries in 4 integer variables efficiently?

I want to find symmetries in 4 integer variables i,j,k and l . The symmetries are: all four numbers are equal: XXXX, three numbers are equal: XXXY,XXYX,XYXX,YXXX two pairs of equal numbers: XXYY,XYXY,XYYX,... one pair of equal numbers and two…
Kulibo
  • 91
  • 7
4
votes
1 answer

LeafletJS: How to flip tiles vertically on-the-fly?

Background: I've produced a 1-terapixel rendering of the Mandelbrot Set and am using LeafletJS to zoom and pan around in it interactively. It works great. But since the Mandelbrot Set is symmetric along the real axis, I'm currently using twice as…
Todd Lehman
  • 2,880
  • 1
  • 26
  • 32
4
votes
6 answers

Overriding equals method without breaking symmetry in a class that has a primary key

the answer to this question is probably "not possible", but let me ask regardless :) Assuming we have a very simple JAVA class that has a primary key, for example: class Person { String ssid; String name; String address; ... } Now,…
Kosta
  • 536
  • 1
  • 4
  • 9
3
votes
2 answers

Algorithm to Calculate Symmetry of Points

Given a set of 2D points, I want to calculate a measure of how horizontally symmetrical and vertically symmetrical those points are. Alternatively, for each set of points I will also have a rasterised image of the lines between those points, so is…
Cocowalla
  • 13,822
  • 6
  • 66
  • 112
3
votes
3 answers

How would I go about fixing 'list index out of range' error in this Python code?

I am trying to write a function that would be able to check the symmetry of a matrix that the user inputs. If the matrix is symmetrical, true is printed. If not, false is printed. def symmetric(mat, N): for i in range(N): for j in…
3
votes
2 answers

How to create a symmetric matrix where each row/column is a subset of a known vector

I have a 7*1 vector a = (1:7).'. I want to form a matrix A of size 4*4 from vector a such that the elements of a form the anti-diagonals of matrix A as follows: A = [1 2 3 4; 2 3 4 5; 3 4 5 6; 4 5 6 7] I would like this to work for a…
sn at
  • 61
  • 7
2
votes
2 answers

Get consolidated difference between arrays - from the need to sync arrays in this situation

I'm not sure if I've described the problem best in the title but I'll elaborate here. My overall goal is to keep lists in sync, I'm currently trying to get a specific output so that I can later correct list symmetry. I've figured it out to this…
RobbB
  • 1,214
  • 11
  • 39
2
votes
0 answers

Symmetry detection in images in Python

I'm working with an algorithm to detect symmetries in an irregular object, I'm using only Python with nunmpy and matplotlib, no possibility to use OpenCv, after I rotate my object along the principal axes, I get something like that rotated…
2
votes
1 answer

Enforcing symmetry in Keras

I am looking for a way to create a neural-network model in Keras for a function, which is symmetric with respect to interchange of its inputs. For simplicity lets assume, that the function of interest depends on two variables x,y and returns a…
TMueller83
  • 412
  • 3
  • 11
2
votes
1 answer

Should I use Halfcomplex2Real or Complex2Complex

Good morning, I'm trying to perform a 2D FFT as 2 1-Dimensional FFT. The problem setup is the following: There's a matrix of complex numbers generated by an inverse FFT on an array of real numbers, lets call it arr[-nx..+nx][-nz..+nz]. Now, since…
Mirco
  • 165
  • 2
  • 13
1
vote
0 answers

How can I detect all symmetries in a collection of large boolean arrays?

I have a project that involves an unbounded grid of booleans. The grid is very sparsely populated in that I doubt that there will ever be more than 8 Trues in the entire grid. I'm optimizing a brute force problem, where the starting layout of Trues…
Sniggerfardimungus
  • 11,583
  • 10
  • 52
  • 97
1
vote
0 answers

Finding Centre or Symmetric Line of a Segmentation Image

I have an image dataset consisting of segmentation images where the target object is rectangular ship (segmented as white or 1) and hence everything else in the background is black or 0. I have drawn the blue line to depict the longitudinal…
1
vote
1 answer

WPF FlowDocument Symmetric Layout

How can a symmetric layout be generated using one FlowDocument? My code is:
flyKite
  • 35
  • 4