Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IncidenceStructure.is_uniform, is_regular, and complement #18986

Closed
nathanncohen mannequin opened this issue Aug 4, 2015 · 9 comments
Closed

IncidenceStructure.is_uniform, is_regular, and complement #18986

nathanncohen mannequin opened this issue Aug 4, 2015 · 9 comments

Comments

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Aug 4, 2015

Three methods that we miss. One of them seems to be useful for #18972.

I have been trying to find a way for those methods to tell you at the same time if a hypergraph is k uniform, and the value of k. There is an unfortunate corner-case, but I still think that it is the best way to implement it.

Nathann

CC: @dimpase @videlec

Component: combinatorial designs

Author: Nathann Cohen

Branch/Commit: 55f934b

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/18986

@nathanncohen nathanncohen mannequin added this to the sage-6.9 milestone Aug 4, 2015
@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Aug 4, 2015

Commit: 55f934b

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Aug 4, 2015

Branch: u/ncohen/18986

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Aug 4, 2015

New commits:

55f934btrac #18986: IncidenceStructure.is_uniform, is_regular, and complement

@dimpase
Copy link
Member

dimpase commented Aug 7, 2015

comment:2

LGTM

@dimpase
Copy link
Member

dimpase commented Aug 7, 2015

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Aug 7, 2015

comment:3

How would I use complement in #1897 ? I need it to be called with uniform=True. How does one write this:

def complement(): # not actual code
    return self.???inherited???.complement(uniform=True)

thanks,
Dima

@dimpase
Copy link
Member

dimpase commented Aug 7, 2015

comment:4

I tried

   def complement(self):
        return super(self).complement(uniform=True)

and got

sage: p=graphs.CompleteGraph(8).line_graph().twograph()
sage: p.complement()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-cc3764592501> in <module>()
----> 1 p.complement()

/home/dima/software/sage/local/lib/python2.7/site-packages/sage/combinat/designs/twographs.pyc in complement(self)
    141 #        return TwoGraph(filter(lambda x: not list(x) in self.blocks(),
    142 #                                combinations(self.ground_set(), 3)))
--> 143         return super(self).complement(uniform=True)
    144 
    145 """

TypeError: must be type, not TwoGraph

@dimpase
Copy link
Member

dimpase commented Aug 7, 2015

comment:5

Replying to @dimpase:

I tried

   def complement(self):
        return super(self).complement(uniform=True)

and got

sage: p=graphs.CompleteGraph(8).line_graph().twograph()
sage: p.complement()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-cc3764592501> in <module>()
----> 1 p.complement()

/home/dima/software/sage/local/lib/python2.7/site-packages/sage/combinat/designs/twographs.pyc in complement(self)
    141 #        return TwoGraph(filter(lambda x: not list(x) in self.blocks(),
    142 #                                combinations(self.ground_set(), 3)))
--> 143         return super(self).complement(uniform=True)
    144 
    145 """

TypeError: must be type, not TwoGraph

Oh, I see, it must be super(TwoGraph,self). Then it works, OK, question answered, sorry for noise.

@vbraun
Copy link
Member

vbraun commented Aug 7, 2015

Changed branch from u/ncohen/18986 to 55f934b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants