Opened 5 years ago

Closed 5 years ago

#16846 closed enhancement (fixed)

a difference_matrices module

Reported by: ncohen Owned by:
Priority: major Milestone: sage-6.4
Component: combinatorial designs Keywords:
Cc: vdelecroix Merged in:
Authors: Nathann Cohen Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: c66c19b (Commits) Commit: c66c19b305799452765ccf53d3380ee670700f85
Dependencies: #16817 Stopgaps:

Description

This commit creates a difference_matrices module which does not do much at the moment: it can creates DM for prime powers, and return DM from the database.

In the database, however, a lot changes as many OA were actually difference matrices. The constructors are turned into difference matrices constructors, and orthogonal_array now calls difference_matrix to get them.

All in all what this patch does is mostly code administration, but well, that's the way to go ...

Quasi-difference matrices will be handled later as there are some problems with them, in particular in the way orthogonal_array will query the future quasi_difference_matrix constructor.

Nathann

Change History (15)

comment:1 Changed 5 years ago by ncohen

  • Branch set to u/ncohen/16846
  • Status changed from new to needs_review

comment:2 Changed 5 years ago by git

  • Commit set to 2649805f41094602cfbd2787f75028d806cf2d05

Branch pushed to git repo; I updated commit sha1. New commits:

8f10d94trac #16797: is_difference_matrix
aa097f6trac #16797: Fit with the current definition until we can change everything at once
5d21b8ctrac #16797: int * and ** instead of Python list
8f29bd1trac #16797: change int to int * in a malloc
811e3e9trac #16797: better malloc + better error msg
1b8c2e3trac #16797: More compact mallocs
b78c347trac #16797: Reorder the arguments to copy is_orthogonal_array
dee4275trac #16797: Merged with 6.4.beta0
896f0e1trac #16797: correct a row/column inversion
2649805trac #16846: a difference_matrices module

comment:3 Changed 5 years ago by ncohen

Sorry for the diff in the database file, it's a bit hard to review with everything being mixed up by the diff algorithm... :-/

What happens there is simple: some DM_* functions are removed and replaced by their DM_* counterpart. No new constructor is added, it's only a rephrase of that code.

Nathann

comment:4 follow-up: Changed 5 years ago by vdelecroix

Hi Nathann,

Very nice that you did that!

I guess that difference matrices are interesting only over Abelian groups. Is that true? It would be nice to coordinate with difference families for input/output. For example, in #16802, in the database, you can ask a difference family with a given group and not only a fixed cardinality. It is not perfect, but I tried to start involving the group...

Vincent

comment:5 in reply to: ↑ 4 ; follow-up: Changed 5 years ago by ncohen

Yo !

I guess that difference matrices are interesting only over Abelian groups. Is that true?

I have no idea about that, but all examples I saw were on abelian groups indeed.

It would be nice to coordinate with difference families for input/output. For example, in #16802, in the database, you can ask a difference family with a given group and not only a fixed cardinality. It is not perfect, but I tried to start involving the group...

Hmmmmm... So a structure like that ?

DM_constructions = {
   order_of_the_group : {
     signature_of_the_abelian_group: [
         (k1,matrix_constructor1),
         (k2,matrix_constructor2)
         ]
     }
}

Having several difference families/matrices or OA and stuff is a hobby of yours, you know ? To me it's just not the interesting direction :-P

It can be done anyway but we have to do that later, this heap of patches is really getting dangerous. Plus Travis wrote a patch that is totally incompatible with this one, and there are like 10 tickets in linear order an needs_review at the moment :-P

Nathann

comment:6 in reply to: ↑ 5 ; follow-up: Changed 5 years ago by vdelecroix

Replying to ncohen:

Yo !

I guess that difference matrices are interesting only over Abelian groups. Is that true?

I have no idea about that, but all examples I saw were on abelian groups indeed.

Because you can not develop a difference matrix to get an OA if the group is non Abelian. But perhaps, difference matrices can be used for other purposes.

It would be nice to coordinate with difference families for input/output. For example, in #16802, in the database, you can ask a difference family with a given group and not only a fixed cardinality. It is not perfect, but I tried to start involving the group...

Hmmmmm... So a structure like that ?

DM_constructions = {
   order_of_the_group : {
     signature_of_the_abelian_group: [
         (k1,matrix_constructor1),
         (k2,matrix_constructor2)
         ]
     }
}

Might be better than what I did... I used {signature: DF}

Having several difference families/matrices or OA and stuff is a hobby of yours, you know ? To me it's just not the interesting direction :-P

Sometimes it is very important that your group is cyclic (for difference families or difference matrix)... so you want to be able to ask a given difference X over a cyclic group only.

It can be done anyway but we have to do that later, this heap of patches is really getting dangerous. Plus Travis wrote a patch that is totally incompatible with this one, and there are like 10 tickets in linear order an needs_review at the moment :-P

+1

Vincent

comment:7 in reply to: ↑ 6 Changed 5 years ago by ncohen

Might be better than what I did... I used {signature: DF}

If you just want a difference family to exist in order to build a BIBD but don't know the exact decomposition you need to list everything :-/

Nathann

comment:8 Changed 5 years ago by ncohen

  • Branch changed from u/ncohen/16846 to public/16846
  • Commit changed from 2649805f41094602cfbd2787f75028d806cf2d05 to 3e0a79ba3154c1e2c9591c60cc9092361f77dfd7

Last 10 new commits:

e6deb83trac #16859: doc
db53470trac #16780: Merged with #16859 (need the resolvable incomplete OA)
52c4fa0trac #16780: resolvable incomplete OA are built with 2 lines
7fe173atrac #16780: review 2
931a33ftrac #16780: repeat "parallel classes"
5b8500btrac #16864: designs/database.py: auto-generated doc index
bfbad46trac #16864: use Python string .format() + doc
3ca48dctrac #16817: OA for n=205,254,469,520,522,524,1262
43034f4trac #16846: a difference_matrices module
3e0a79btrac #16846: Remove obsolete functions

comment:9 Changed 5 years ago by vdelecroix

  • Milestone set to sage-6.4

comment:10 Changed 5 years ago by git

  • Commit changed from 3e0a79ba3154c1e2c9591c60cc9092361f77dfd7 to f7afe6f10d690f12c568401e8850a713f6874d51

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

c92e9bftrac #16846: a difference_matrices module
fdab06etrac #16846: Remove obsolete functions
f7afe6ftrac #16846: Broken doctests

comment:11 Changed 5 years ago by git

  • Commit changed from f7afe6f10d690f12c568401e8850a713f6874d51 to fd1bbc6686b99e38d200fecd32def5574d4ca806

Branch pushed to git repo; I updated commit sha1. New commits:

f9e6569trac #16817: docfix
fd1bbc6trac #16846: Merge with updated #16817

comment:12 Changed 5 years ago by git

  • Commit changed from fd1bbc6686b99e38d200fecd32def5574d4ca806 to c66c19b305799452765ccf53d3380ee670700f85

Branch pushed to git repo; I updated commit sha1. New commits:

c66c19btrac #16846: review

comment:13 Changed 5 years ago by vdelecroix

I did

  • removed TD_6_12
  • OA_7_39 -> DM_39_6_1

As a consequence, doc builds... and test still pass.

If you like it, set to positive review.

Vincent

comment:14 Changed 5 years ago by ncohen

  • Reviewers set to Vincent Delecroix
  • Status changed from needs_review to positive_review

The doc builds, and doctests pass. Thank you very much for this last review ! :-D

Nathann

comment:15 Changed 5 years ago by vbraun

  • Branch changed from public/16846 to c66c19b305799452765ccf53d3380ee670700f85
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.