[sage-support] Re: cocalc

2017-08-11 Thread fidelbc
Hi, Perhaps adding the mesh=True for each of the parametric_plot3d calls will do the job? var("r,theta,phi"); def coordfunc(r,theta,phi,switch,shift=0): if switch=="yin": return (r*sin(theta)*cos(phi)+shift,r*sin(theta)*sin(phi),r*cos(theta)) else: return

[sage-support] Re: FInd all paths of given length n

2017-07-28 Thread fidelbc
There is a typo in the code above. The True argument belongs to the subgraph_search_iterator function, not the PathGraph, that is, g.subgraph_search_iterator(graphs.PathGraph(3), induced=True) On Thursday, July 27, 2017 at 10:16:29 AM UTC-4, fidelbc wrote: > > Not directly, but it sho

[sage-support] Re: FInd all paths of given length n

2017-07-27 Thread fidelbc
: > print(p) > > This is giving the all the paths of length 3. But I have one more question. > > Suppose $xyz$ is induced path of length 3. Note that $zyx$ is also induced > path of length. > Can I avoid this path? > > > > On Thursday, July 27, 2017 at 12:07

[sage-support] Re: FInd all paths of given length n

2017-07-27 Thread fidelbc
Yes we can. Suppose the path has length k and thus k+1 vertices. Then the following command returns an iterator over all lists of vertices that induce paths on k+1 vertices in G. G.subgraph_search_iterator(graphs.PathGraph(k+1),induced=True) More on this may be found at [1]. [1];

[sage-support] Re: Planar graph drawing

2015-10-19 Thread fidelbc
That is a very nice function. One thing to note is that having edges added in this way may bump up the running time above O(n), since we would have to be testing that planarity is preserved after adding a given edge. I do agree that sometimes the drawings output by the planar layout are not

[sage-support] Re: Planar graph drawing

2015-10-19 Thread fidelbc
It is simpler to check if a graph is maximal planar. If you already know the graph is planar, then just check if it has 3n-6 edges. If it does, then it is maximal, otherwise it isn't. What planar layout do you suggest for graphs that are not maximal planar? f On Monday, October 19, 2015 at

[sage-support] Re: Planar graph drawing

2015-10-18 Thread fidelbc
Hello Dominique, One thing to note here is that the graph you are trying to plot is not a planar triangulation. The planar drawings output by sage are precisely those proposed by Schnyder for planar triangulations. What happens when you ask for a planar drawing of a planar non triangulated

[sage-support] Re: Building SageMath 6.8: gf2x, ncurses error in ArchLinux

2015-07-30 Thread fidelbc
I have compiled the sage 6.8 source code twice. Just wanted to add that the two proposed solutions from above work. On Thursday, July 30, 2015 at 12:53:38 AM UTC-4, fidelbc wrote: These seem to be known issues with gcc version = 5, see [1] and [2]. A possible workaround is to use

[sage-support] Re: Building SageMath 6.8: gf2x, ncurses error in ArchLinux

2015-07-29 Thread fidelbc
Hello Paul, Unfortunately I don't have access to GCC 4.9.x. I think after Volker's suggestion GCC 4.9.2 was supposed to be built, but it failed. I did try to build the source you suggested using GCC 5.2.0 and it failed again. Please find attached the compilation log (the error seems to be the

[sage-support] Re: Building SageMath 6.8: gf2x, ncurses error in ArchLinux

2015-07-29 Thread fidelbc
at 1:43:54 PM UTC-4, fidelbc wrote: Hello, I'm trying to build sage on arch linux: $ uname -a Linux 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015 x86_64 GNU/Linux The packages that seem to fail to build are gf2x and ncurses (please see attached logs). I usually build sage

[sage-support] Building SageMath 6.8: gf2x, ncurses error in ArchLinux

2015-07-27 Thread fidelbc
Hello, I'm trying to build sage on arch linux: $ uname -a Linux 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015 x86_64 GNU/Linux The packages that seem to fail to build are gf2x and ncurses (please see attached logs). I usually build sage using MAKE=make -j4 Any help on trying to

[sage-support] Re: show graph with sage script

2015-07-24 Thread fidelbc
Have you tried using the *show* command? If *P* is the graphics object you can try using *show(P)*It might be helpful if you give more details about which version of sage you are using and in which mode (command line, notebook,...). On Tuesday, July 21, 2015 at 5:58:36 AM UTC-4, avi kaur

Re: [sage-support] Re: integrating a matrix

2015-07-16 Thread fidelbc
Thanks for the input Nils! On Thursday, July 16, 2015 at 4:04:01 AM UTC-4, Nils Bruin wrote: On Thursday, July 16, 2015 at 3:57:20 AM UTC+2, fidelbc wrote: Maybe you can try implementing something along these lines *def integrate_matrix(A):* *m = A.nrows()* *n = A.ncols

Re: [sage-support] Re: integrating a matrix

2015-07-15 Thread fidelbc
Maybe you can try implementing something along these lines *def integrate_matrix(A):* *m = A.nrows()* *n = A.ncols()* *return matrix(m,n, [entry.integrate() for row in A for entry in row ])* On Wednesday, July 15, 2015 at 12:33:21 PM UTC-4, avi kaur wrote: On Wed, Jul 15, 2015 at

[sage-support] [plot3d in cloud] show function bug?

2015-07-09 Thread fidelbc
Hello everyone, In cloud.sagemath; is there a bug in the behaviour of the code below? P.show() just outputs Graphcs3d Object. P=point3d([0,0,0]) P.show() |Graphics3d Object However P and show(P) do show the plot. This question came up in [1]. [1]

[sage-support] Re: sage 6.6: libgd may have failed to build

2015-05-01 Thread fidelbc
=547310#c8 Fidel On Wednesday, April 29, 2015 at 11:39:44 PM UTC-4, fidelbc wrote: Hello, Just trying to build sage on arch linux: [fidbc@avalancha ~]$ uname -a Linux avalancha 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux There seems to be an error while

[sage-support] sage 6.6: libgd may have failed to build

2015-04-29 Thread fidelbc
Hello, Just trying to build sage on arch linux: [fidbc@avalancha ~]$ uname -a Linux avalancha 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux There seems to be an error while building libgd. A couple of possibly related errors were reported on sage-release: