Re: [sage-devel] Re: Efficiency of computing the chromatic number

2015-08-31 Thread Jernej Azarija
On Monday, 31 August 2015 18:05:10 UTC+2, Nathann Cohen wrote: > > > I am doing 8-regular graphs of order 1000 so they have large > indepdendent > > sets and Sage actually gets stuck in computing their Independence number > =) > > On the other hand CPLEX finds the chromatic number within a fe

[sage-devel] Re: Efficiency of computing the chromatic number

2015-08-31 Thread Jernej Azarija
On Monday, 31 August 2015 15:55:33 UTC+2, Nathann Cohen wrote: > > So I am wondering - does it actually make sense to compute the clique >> number and independent set of a graph that is very large and sparse (say >> 8-regular graph on 1k vertices?) >> >> Computing the chromatic number on my in

[sage-devel] Efficiency of computing the chromatic number

2015-08-31 Thread Jernej Azarija
Hey there! I have a question related to how Sage computes the chromatic number (=proper coloring) of a graph using the algorithm MILP. As I understand the code, it basically tries to find a good upper bound on the chromatic number and then it writes a ILP with that bound in mind. In trying

[sage-devel] A database of "interesting" graphs

2015-05-18 Thread Jernej Azarija
Hello! A group of people here at my UNI wants to start creating databases storing interesting graphs and some of their (non-trivial to compute) invariants. The idea is to then make them available through optional Sage spkg's. Our aim is to start with cubic vertex transitive graphs which were c

Re: [sage-devel] Re: Exit status of Sage

2015-01-18 Thread Jernej Azarija
On Sun, Jan 18, 2015 at 5:02 PM, Dima Pasechnik wrote: > On 2015-01-18, Jernej Azarija wrote: > > The thing is that sys.exit works pretty much the same way > > > > > > azi@goodegg:~$ cat foo.sage > > import sys > > sys.exit(42) > > azi@goodegg:~$

Re: [sage-devel] Re: Exit status of Sage

2015-01-18 Thread Jernej Azarija
of non-needed output. On Sat, Jan 17, 2015 at 11:24 PM, Robert Bradshaw < rober...@math.washington.edu> wrote: > On Sat, Jan 17, 2015 at 2:02 PM, John H Palmieri > wrote: > > > > > > On Saturday, January 17, 2015 at 10:28:22 AM UTC-8, Jernej Azarija wrote: > &

[sage-devel] Re: Exit status of Sage

2015-01-17 Thread Jernej Azarija
I suppose there is a bug in the sage bash script? === 101 102 # Return $out 103 echo "$out" 104 } === should that be exit actually? On Saturday, 17 January 2015 19:28:22 UTC+1, Jernej Azarija wrote: > > Hello, > > I have to use Sage from

[sage-devel] Exit status of Sage

2015-01-17 Thread Jernej Azarija
Hello, I have to use Sage from an external comand and in order to do so I'll need to rely on the exit status given by Sage. Considering a trivial example = $ cat foo.sage exit(0) = I get the following behaviour = $ sage la.sage 0 $ echo $? 1 =

Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
PM, Volker Braun wrote: > You need to move the typedef outside of the class scope, see my second > post. > > > On Monday, December 29, 2014 7:57:02 PM UTC+1, Jernej Azarija wrote: >> >> Volker, >> >> this gives me the exact same error: >> >> ==

Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
Volker, this gives me the exact same error: cdef cppclass Graph(AbstractGraph): ctypedef enum Graph_SplittingHeuristic "Graph::SplittingHeuristic": ^ sage/graphs/bliss.pyx:36:22: Syntax error i

[sage-devel] Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
Dear sage-devel, I have another question related to Cython. I like to post them here instead of cython-users as it seems to me that the former is a much slower group. That said The definition of the Graph class in one of the libraries is : === class Graph :

Re: [sage-devel] Re: Cython: passing a Python data structure as a void pointer

2014-12-26 Thread Jernej Azarija
Hey Nathann, yes yes, that's precisely what I was looking for: cpdef void *user_param = data .. data = user_param Thanks for the help Jernej On Fri, Dec 26, 2014 at 2:19 PM, Nathann Cohen wrote: > Yoo Jernej ! > > Not sure I understood what you wanted, but in > graphs/base/stat

[sage-devel] Cython: passing a Python data structure as a void pointer

2014-12-26 Thread Jernej Azarija
Dear sage-devel, I have a question related to void pointers in Cython. I am wrapping a C++ library that has a function that accepts a function pointer and each time it processes something it calls the passed function. The function being passed is defined as void hook(void *user_param , unsigne

Re: [sage-devel] Re: Correct way to wrap a C++ class in Cython

2014-12-24 Thread Jernej Azarija
r: > /home/vbraun/Sage/git-temp/local/lib/python2.7/site-packages/sage/graphs/bliss.so: > undefined symbol: _ZN5bliss5GraphC1Ej > > But compilation is fine. You either aren't using the "gcc" that you think > you are using, or maybe have a clashing header somewhere. > &

[sage-devel] Graphs: speeding ub subgraph creation?

2014-12-23 Thread Jernej Azarija
Hello! In a thing that I am recently doing I have to consider large subgraphs of large and dense graphs. For any such subgraph I have to solve some linear programming problem on them. I am quite surprised that it takes much more time to actually obtain the graph than to solve the corresponding

Re: [sage-devel] Re: Correct way to wrap a C++ class in Cython

2014-12-23 Thread Jernej Azarija
cpp file or post a branch. > > > > On Sunday, December 21, 2014 4:24:38 PM UTC+1, Jernej Azarija wrote: >> >> Volker, >> >> I am using gcc version 4.8.2 and the git version of sage that I myself >> compiled. I am also attaching the graph.hh file in case I tr

[sage-devel] Re: Correct way to wrap a C++ class in Cython

2014-12-21 Thread Jernej Azarija
Volker, I am using gcc version 4.8.2 and the git version of sage that I myself compiled. I am also attaching the graph.hh file in case I trimmed it too much. Could you please check what is going on? Thanks for your help, Jernej On Saturday, 20 December 2014 17:27:03 UTC+1, Volker Braun wrote

[sage-devel] Correct way to wrap a C++ class in Cython

2014-12-20 Thread Jernej Azarija
Dear sage-devel, I have a question about the usage of Cython . I would like to wrap a C++ library whose definition looks like = namespace bliss { class AbstractGraph; } class AbstractGraph { friend class Partition;

[sage-devel] Re: Wrapping up a C++ library

2014-12-14 Thread Jernej Azarija
Hm... So what is the current workaround if I want to use cython on a C++ wrapper? On Saturday, 13 December 2014 19:31:07 UTC+1, Volker Braun wrote: > > This is http://trac.sagemath.org/ticket/15217 > > > On Saturday, December 13, 2014 6:20:22 PM UTC+1, Jernej Azarija wrote: >&

[sage-devel] Wrapping up a C++ library

2014-12-13 Thread Jernej Azarija
Hello! I am trying to wrap up a C++ library using Cython and I am having a problem running the *.pyx file. Specifically I have the following Cython program: = # distutils: language = c++ # clang C++ cdef extern from "graph.hh": cdef cppclass Graph: Graph(int) def foo():

[sage-devel] Re: Using C++ allocation in a Cython program

2014-03-21 Thread Jernej Azarija
The "array new" operator is not available in Cython, so if you really need > it you must write a C++ helper function to do the allocation for you. > I see, thanks for the info. > > > > On Friday, March 21, 2014 1:55:26 PM UTC-4, Jernej Azarija wrote: >> >> T

[sage-devel] Re: Using C++ allocation in a Cython program

2014-03-21 Thread Jernej Azarija
le. > > > > > > > On Friday, March 21, 2014 7:41:08 AM UTC-4, Jernej Azarija wrote: >> >> Hello, >> >> I would like to write a Cython wrapper for a C++ library. Since the >> library in question requires me to pass C++ objects, I am trying to fi

[sage-devel] Using C++ allocation in a Cython program

2014-03-21 Thread Jernej Azarija
Hello, I would like to write a Cython wrapper for a C++ library. Since the library in question requires me to pass C++ objects, I am trying to figure out how to do it in Cython. I am having some trouble using the construct new. The minimal example of the problem being resembled by the followin

[sage-devel] Graph neighbors slowdown - could it be caused by wrapping objects?

2013-08-30 Thread Jernej Azarija
This is a follow up of the thread [1] in which we noticed that there is a substantial performance issue in the Graph.neighbors method. The point of this thread is mainly to draw your attention and perhaps spot what is causing the described issue. As it turns out our default graph backend is act

[sage-devel] Re: Is the glass half-full or half-empty ? Pick a standard.

2013-08-19 Thread Jernej Azarija
Hello! As you can check here http://mathoverflow.net/questions/120536/is-the-empty-graph-a-tree the big shot guys agree that the empty graph is to be considered disconnected. So YES in general, mathematicians appear to be depressed persons. On Mon, Aug 19, 2013 at 5:51 PM, Nathann Cohen w

[sage-devel] Re: Orderings and dictionaries

2013-05-14 Thread Jernej Azarija
This is what the guys on #python (IRC) told me to consider >>> d1 = {-1: 0, -2: 0}>>> d2 = {-2: 0, -1: 0}>>> d1{-2: 0, -1: 0}>>> d2{-1: 0, >>> -2: 0}>>> d1 == d2True>>> d1.keys()[-2, -1]>>> d2.keys()[-1, -2]>>> On Tue, May 14, 2013 at 12:12 PM, Nathann Cohen wrote: > Hello everybody

Re: [sage-devel] Looking for a GSOC mentor - improving Sage's core performance

2013-04-24 Thread Jernej Azarija
On Wednesday, 24 April 2013 16:54:12 UTC+2, Martin Albrecht wrote: > > On Wednesday 24 Apr 2013, Jernej Azarija wrote: > > 4. Optimized linear algebra over small fields with M4RI > > and on: http://azi.dev.si/GSOC2013_proposal2.html > > Integrate the M4RI ro

Re: [sage-devel] Looking for a GSOC mentor - improving Sage's core performance

2013-04-24 Thread Jernej Azarija
On Wednesday, 24 April 2013 13:52:06 UTC+2, Jeroen Demeyer wrote: > > On 04/24/2013 12:51 PM, Jernej Azarija wrote: > > 3. Slow startup of Sage > This is already a Sage GSOC project, check out the projects page. It > would certainly be good to work on this. > > Yes

[sage-devel] Looking for a GSOC mentor - improving Sage's core performance

2013-04-24 Thread Jernej Azarija
Hello! In the discussion about my (potential) participation in GSOC2013 ( see https://groups.google.com/forum/?fromgroups=#!topic/sage-gsoc/J-oU64VM7Pw ) we came to the conclusion that it would be nice to address the following performance issues : 1. Slow performance of combinatorial functions

[sage-devel] Review process for contributions

2013-02-28 Thread Jernej Azarija
Hello! I have noticed (at least in the fields to which I made some small contributions) that the number of reviewers is arbitrary. Sometimes there is only one reviewer sometimes two, three.. I cannot speak for others, but I wouldn't want to be the only reviewer of a patch since I am quick to o

[sage-devel] Re: Graph theory roadmap

2013-02-06 Thread Jernej Azarija
Hello! I have allowed myself to make some pretty aggressive changes to the graph theory roadmap page. http://trac.sagemath.org/sage_trac/wiki/GraphTheoryRoadmap Feel free to revert it back to the previous state if you don't like its current look! Best regards, Jernej -- You received this m

[sage-devel] Re: Graph theory roadmap

2013-01-24 Thread Jernej Azarija
On Thursday, 24 January 2013 10:19:33 UTC+1, Nathann Cohen wrote: > > > This question is related to the following page >> http://trac.sagemath.org/sage_trac/wiki/GraphTheoryRoadmap > > > Oh yeah. This is the page that sometimes pops up when I google something > :-D > Yes! Someone even posted th

[sage-devel] Graph theory roadmap

2013-01-23 Thread Jernej Azarija
Hello! This question is related to the following page http://trac.sagemath.org/sage_trac/wiki/GraphTheoryRoadmap As one can see the last time it was modified was 3 years ago. Now in the meantime many new things appeared in Mathematica as well as in Sage. So I am wondering if the page is obsol

[sage-devel] Re: Strange performance (bug?) computing a specific determinant

2013-01-02 Thread Jernej Azarija
e the pari package that sage ships! Best, Jernej On Thursday, 6 September 2012 14:12:07 UTC+2, Jernej Azarija wrote: > > Consider the following program > > sage: G = graphs.OddGraph(4) > sage: G.spanning_trees_count() > 336140 > > It takes approximately

[sage-devel] Re: Graph neighbours - room for huge performance boost

2013-01-02 Thread Jernej Azarija
Heey! Do we actually need to have a dict of a dict? Aren't sets implemented with some other data structure? I suppose if networkX uses this approach then it is doable! Best, Jernej On Wednesday, 2 January 2013 09:22:08 UTC+1, Nathann Cohen wrote: > > Hellooo !!! > > You are totally ri

[sage-devel] Graph neighbours - room for huge performance boost

2013-01-01 Thread Jernej Azarija
Hello! By profiling Sage scripts involving graphs one can easily see that the bottleneck is usually in computing the list of neighbours (Graph.neighbours). This is somehow to be expected since most graph-theoretical algorithms perform operations on neighbours of vertices. Currently it appear

Re: [sage-devel] Inconsitent output of the domain for the automorphism group of graph?

2012-12-28 Thread Jernej Azarija
tract permutation > group > > (as is done now) or a group equipped with an action on the edges and > > vertices of the graph. > > David > > > > This is a good idea. For the lurkers, azi created ticket #13874 for this. > > -- > Benjamin Jones

Re: [sage-devel] Inconsitent output of the domain for the automorphism group of graph?

2012-12-28 Thread Jernej Azarija
On Thursday, 27 December 2012 23:51:07 UTC+1, Benjamin Jones wrote: > > On Thu, Dec 27, 2012 at 1:07 PM, Jernej Azarija > > > wrote: > > > > > > On Thursday, 27 December 2012 20:59:45 UTC+1, Benjamin Jones wrote: > >> > >> On Thu, De

[sage-devel] Permuation group on arbitrary points

2012-12-28 Thread Jernej Azarija
Hello! In this post, https://groups.google.com/d/msg/sage-support/HX0QfXgwO5s/aG8LryPd4HIJ OP claims it is now possible to use arbitrary points for permutation groups. I am not very experienced with groups in sage so I am wondering if that is indeed the case. Are there any examples how this

Re: [sage-devel] Inconsitent output of the domain for the automorphism group of graph?

2012-12-28 Thread Jernej Azarija
On Thu, Dec 27, 2012 at 11:51 PM, Benjamin Jones wrote: > On Thu, Dec 27, 2012 at 1:07 PM, Jernej Azarija > wrote: > > > > > > On Thursday, 27 December 2012 20:59:45 UTC+1, Benjamin Jones wrote: > >> > >> On Thu, Dec 27, 2012 at 11:39 AM, Jernej Azarija

Re: [sage-devel] Inconsitent output of the domain for the automorphism group of graph?

2012-12-27 Thread Jernej Azarija
On Thursday, 27 December 2012 20:59:45 UTC+1, Benjamin Jones wrote: > > On Thu, Dec 27, 2012 at 11:39 AM, Jernej Azarija > > > wrote: > > Hello! > > > > I apologize for posting this question here but somehow I am not allowed > to > > drop questio

[sage-devel] Inconsitent output of the domain for the automorphism group of graph?

2012-12-27 Thread Jernej Azarija
Hello! I apologize for posting this question here but somehow I am not allowed to drop questions to sage-support. Moreover I do not feel confident enough to post this thing as a bug on the trac wiki. Working with a large graph G on ~250 vertices I have noticed that elements of the automorphism

Re: [sage-devel] Re: Sage testing

2012-11-21 Thread Jernej Azarija
That is very neat! Thanks for the info guys! On Wednesday, 21 November 2012 18:12:27 UTC+1, Michael Orlitzky wrote: > > On 11/21/2012 11:34 AM, P Purkayastha wrote: > > > > The policy is to add examples and tests within your documentation. Look > > up the source code of some function like > >

[sage-devel] Sage testing

2012-11-21 Thread Jernej Azarija
Hello! I was wondering how is testing of Sage currently performed. What I was wondering is if there is a policy that for every new addition to sage there is also a suitable test case that is prepared to test the specific addition. For example if I add the function foo() to the graph class is

[sage-devel] Re: Testing if a graph is edge-transitive

2012-11-18 Thread Jernej Azarija
; > > > > > > On Tue, Oct 30, 2012 at 4:23 AM, Dima Pasechnik > > > > wrote: > >> On 2012-10-30, Jernej Azarija > > wrote: > >>> --=_Part_1698_7171753.1351582604933 > >>> Content-Type: text/plain;

Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-30 Thread Jernej Azarija
was edge-transitive. It took more than a minute, and I > killed it. The already-implemented > G.line_graph().is_vertex_transitive() finished in 26 ms. > Indeed this version is very very slow compared to the testing of vertex transitive graphs. But nonetheless it is useful since a

Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-29 Thread Jernej Azarija
for > > > > def ec(n) > > c = 0 > > for g in graphs(n): > > if g.is_connected() and g.line_graph().is_vertex_transitive(): > > c+= 1 > > return c > > > > > > > > On Mon, Oct 29, 2012 at 11:37 AM, Jern

Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-29 Thread Jernej Azarija
2012 at 7:12 AM, Jernej Azarija > > > wrote: > > Hello! > > > > I am slowly implementing a patch that will provide some features for > > symmetry testing of graphs. > > > > However I am already puzzled by the following attempt at testing f

[sage-devel] Testing if a graph is edge-transitive

2012-10-29 Thread Jernej Azarija
Hello! I am slowly implementing a patch that will provide some features for symmetry testing of graphs. However I am already puzzled by the following attempt at testing for edge-transitive graphs. Here is a straightforward textbook implementation (the presented code omits the exceptional treat

[sage-devel] Pari stack growning out of bounds

2012-09-24 Thread Jernej Azarija
Consider the following program that computes the spectrum and chromatic number of a graph: for g in graphs.nauty_geng(str(7)): s = g.spectrum() g.chromatic_number() This works quickly and like a charm. Now consider the following program that computes something related to the spectrum an

Re: [sage-devel] Strange performance (bug?) computing a specific determinant

2012-09-06 Thread Jernej Azarija
Interesting! I have also noticed that if I just slightly modify the matrix m2, it again works efficiently. Will someone direct the pariGP guys to this issue? On Thursday, 6 September 2012 17:03:59 UTC+2, D. S. McNeil wrote: > > > That said, I am wondering if this is perhaps a bug in the default

[sage-devel] Strange performance (bug?) computing a specific determinant

2012-09-06 Thread Jernej Azarija
Consider the following program sage: G = graphs.OddGraph(4) sage: G.spanning_trees_count() 336140 It takes approximately 8 minutes to compute the number of spanning trees using this method. However, the number of spanning trees can be computed directly from the charpoly of the respe