Questions tagged [symmetric]

is used in its general meaning, so you are encouraged to use one or more tags in addition to this tag, to describe your case better.

An example of Symmetric would be a Symmetric Key, which is used in both the sides of an algorithm in cryptography.

170 questions
1
vote
2 answers

Algorithm for partial symmetry searched

I'm trying to calculate in percentage how symmetric a concrete Matrix is. The "traditional" way of calculating symmetry would be that I have as input an arbitrary square matrix M of size N×N and that the algorithm's output must be true (=symmetric)…
lydiaP
  • 123
  • 1
  • 13
1
vote
3 answers

symmetric matrix Java construction error

c1 c2 C3 C4 c1 c2 C3 C4 R1 1 0 0 0 R1 1+1 -1 0 0 R2 0 0 0 0 R2 -1 1 0 0 R3 0 0 0 0 R3 0 0 0 0 R4 0 0 0 …
Encipher
  • 1,370
  • 1
  • 14
  • 31
1
vote
1 answer

Dot product B^t.D.B doesn't return a symmetric array

I'm trying to make a dot product of an expression and it was supposed to be symmetric. It turns out that it just isn't. B is a 4D array which I must transpose its last two dimensions to become B^t. D is a 2D array. (It's an expression of the…
1
vote
1 answer

Fill a symmetric matrix using an array

I am trying to create a symmetric matrix n x n matrix and fill it using a n*(n+1)/2 dimension array using the boost library in c++. So far, I am able to create the matrix, and fill it with random values using the following code #include…
Thanos
  • 594
  • 2
  • 7
  • 28
1
vote
3 answers

Is the aliasing rule symmetric?

I had a discussion with someone on IRC and this question turned up. We are allowed by the Standard to change an object of type int by a char lvalue. int a; char *b = (char*) &a; *b = 0; Would we be allowed to do this in the opposite direction, if…
Johannes Schaub - litb
  • 496,577
  • 130
  • 894
  • 1,212
1
vote
1 answer

Numpy symmetric matrix becomes asymmetric when I applied min-max scaling

I have a symmetric matrix (1877 x 1877), here is the matrix file. I try to standardize the values between 0-1. After I apply this method, the matrix is no longer symmetric. Any help is appreciated. print((dist.transpose() == dist).all()) # this…
kitchenprinzessin
  • 1,023
  • 3
  • 14
  • 30
1
vote
1 answer

Create a Symmetric Matrix from a vector in MATLAB

How to covert vector A to symmetric matrix M in MATLAB Such that M is a symmetric matrix (i.e. A21=A12) and all diagonal terms are equal (i.e. A11=A22=A33=A44).
ASE
  • 1,702
  • 2
  • 21
  • 29
1
vote
1 answer

Axis of symmetry in cyclic graph

I have to write a program in c++ which returns the number of axis of symmetry in a cyclic graph. A cyclic graph has an axis of symmetry when values between opposite vertices or edges on the left are a mirror image for values on the right. The axis…
A. W.
  • 35
  • 4
1
vote
2 answers

Drawing a Symmetric Binary B-Tree

I have a little "project" which involves drawing Symmetric Binary B-Trees, like this one: But I cant figure out a way to correctly calculate the position (x,y) of each node. The way Im doing it right now, as the tree's height grows some nodes tend…
markhc
  • 659
  • 6
  • 15
1
vote
1 answer

Is frozenset adequate for caching of symmetric input data in a python dict?

The title more or less says it all: I have a function which takes symmetric input in two arguments, e.g. something like def f(a1, a2): return heavy_stuff(abs(a1 - a2)) Now, I want to introduce some caching method. Would it be correct / pythonic…
Debilski
  • 66,976
  • 12
  • 110
  • 133
1
vote
1 answer

Inversion on symmetrical relation becomes circular in Coq

One possible way to say that n m : nat are adjacent even numbers in Coq is to define that relation inductively, beginning with 0 and 2. Inductive adj_ev : nat -> nat -> Prop := | ae_0 : adj_ev 0 2 | ae_1 : forall ( n m : nat ), adj_ev n m -> adj_ev…
user287393
  • 1,221
  • 8
  • 13
1
vote
2 answers

error: cannot convert 'float (*)[(((sizetype)(((ssizetype)n) + -1)) + 1)]' to 'float (*)[100]' for argument '3'

I'm trying to do a boolean function which verifies if a matrix is symmetric, but I'm getting this error: |54|error: cannot convert 'float ()[(((sizetype)(((ssizetype)n) + -1)) + 1)]' to 'float ()[100]' for argument '3' to 'void Transpose(int, float…
user3369563
1
vote
1 answer

Making a matrix symmetric with regard to row and column name in R

I want to make my matrix symmetric with regard to the row names and columns names, for example, I have a matrix > ma a b c d a 1 5 9 13 c 9 10 11 15 b 5 6 10 14 d 13 14 15 16 I want to make it like > ma a b c…
ToBeGeek
  • 1,105
  • 4
  • 12
  • 20
1
vote
2 answers

R get highest x cells and their rownames/colnames in a symmetric matrix?

I have a symmetric matrix mat: A B C A 1 . . B . 1 . C . . 1 And I want to calculate the two highest elements of it. Now since it's a symmetric matrix I thought of using upper.tri like so: mat.tri<-upper.tri(mat) # convert to upper…
Travis Liew
  • 787
  • 1
  • 11
  • 34
1
vote
1 answer

R apply function on symmetrical matrix

I'd like to utilise one of the apply set of functions to do some calculations. First off, I have two matrices, mat1 and mat2: mat1: a b c 1 NA NA NA 2 1 1 1 3 1 1 NA 4 NA 1 NA mat2: a b c a 1.0 0.2 …
Travis Liew
  • 787
  • 1
  • 11
  • 34