ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 13 Jul 2020 12:21:38 +0200Edge isoperimetric numberhttps://ask.sagemath.org/question/52410/edge-isoperimetric-number/This is probably a very silly question. How does one get the edge isoperimetric number of a graph?
As seen under [here](https://trac.sagemath.org/ticket/21942) there should be an algorithm for it, but when I define a graph (say H), then
<code>
edge_isoperimetric_number(H)
</code>
returns "name 'edge_isoperimetric_number' is not defined"
and
<code>
H.edge_isoperimetric_number()
</code>
returns "'Graph' object has no attribute 'edge_isoperimetric_number'"
(while
<code>
edge_isoperimetric_number?
</code>
returns "Object `edge_isoperimetric_number` not found."
So how do I load said algorithm for use?Fri, 10 Jul 2020 22:04:04 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/Comment by FrédéricC for <p>This is probably a very silly question. How does one get the edge isoperimetric number of a graph?</p>
<p>As seen under <a href="https://trac.sagemath.org/ticket/21942">here</a> there should be an algorithm for it, but when I define a graph (say H), then </p>
<p><code>
edge_isoperimetric_number(H)
</code></p>
<p>returns "name 'edge_isoperimetric_number' is not defined"</p>
<p>and </p>
<p><code>
H.edge_isoperimetric_number()
</code></p>
<p>returns "'Graph' object has no attribute 'edge_isoperimetric_number'"</p>
<p>(while </p>
<p><code>
edge_isoperimetric_number?
</code></p>
<p>returns "Object <code>edge_isoperimetric_number</code> not found."</p>
<p>So how do I load said algorithm for use?</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52413#post-id-52413This ticket has not been merged in sage, so that code is not available. You can try to use git to pull the branch on the ticket page, fix the merge conflict and recompile sage after.Sat, 11 Jul 2020 08:16:45 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52413#post-id-52413Comment by ARG for <p>This is probably a very silly question. How does one get the edge isoperimetric number of a graph?</p>
<p>As seen under <a href="https://trac.sagemath.org/ticket/21942">here</a> there should be an algorithm for it, but when I define a graph (say H), then </p>
<p><code>
edge_isoperimetric_number(H)
</code></p>
<p>returns "name 'edge_isoperimetric_number' is not defined"</p>
<p>and </p>
<p><code>
H.edge_isoperimetric_number()
</code></p>
<p>returns "'Graph' object has no attribute 'edge_isoperimetric_number'"</p>
<p>(while </p>
<p><code>
edge_isoperimetric_number?
</code></p>
<p>returns "Object <code>edge_isoperimetric_number</code> not found."</p>
<p>So how do I load said algorithm for use?</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52414#post-id-52414Thanks...I've never done that before: what is the merge conflict (or how does one fix such a conflict)?Sat, 11 Jul 2020 09:36:23 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52414#post-id-52414Comment by ARG for <p>This is probably a very silly question. How does one get the edge isoperimetric number of a graph?</p>
<p>As seen under <a href="https://trac.sagemath.org/ticket/21942">here</a> there should be an algorithm for it, but when I define a graph (say H), then </p>
<p><code>
edge_isoperimetric_number(H)
</code></p>
<p>returns "name 'edge_isoperimetric_number' is not defined"</p>
<p>and </p>
<p><code>
H.edge_isoperimetric_number()
</code></p>
<p>returns "'Graph' object has no attribute 'edge_isoperimetric_number'"</p>
<p>(while </p>
<p><code>
edge_isoperimetric_number?
</code></p>
<p>returns "Object <code>edge_isoperimetric_number</code> not found."</p>
<p>So how do I load said algorithm for use?</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52415#post-id-52415Actually how does one pull this branch? I don't know how to use the commit number 9a0062d887faa15d6e694f7143bd37514f31d790Sat, 11 Jul 2020 09:49:02 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52415#post-id-52415Comment by ARG for <p>This is probably a very silly question. How does one get the edge isoperimetric number of a graph?</p>
<p>As seen under <a href="https://trac.sagemath.org/ticket/21942">here</a> there should be an algorithm for it, but when I define a graph (say H), then </p>
<p><code>
edge_isoperimetric_number(H)
</code></p>
<p>returns "name 'edge_isoperimetric_number' is not defined"</p>
<p>and </p>
<p><code>
H.edge_isoperimetric_number()
</code></p>
<p>returns "'Graph' object has no attribute 'edge_isoperimetric_number'"</p>
<p>(while </p>
<p><code>
edge_isoperimetric_number?
</code></p>
<p>returns "Object <code>edge_isoperimetric_number</code> not found."</p>
<p>So how do I load said algorithm for use?</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52416#post-id-52416So far... I :
git clone git://github.com/sagemath/sage.git
but when I tried to do either
git fetch trac u/vdelecroix/21942
or
git pull u/vdelecroix/21942
or
git checkout 7880791d25423e16db76c5f855998818c3c8c45e
or many other numbers in the checkout. But it always returns a error message.Sat, 11 Jul 2020 10:21:40 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52416#post-id-52416Answer by FrédéricC for <p>This is probably a very silly question. How does one get the edge isoperimetric number of a graph?</p>
<p>As seen under <a href="https://trac.sagemath.org/ticket/21942">here</a> there should be an algorithm for it, but when I define a graph (say H), then </p>
<p><code>
edge_isoperimetric_number(H)
</code></p>
<p>returns "name 'edge_isoperimetric_number' is not defined"</p>
<p>and </p>
<p><code>
H.edge_isoperimetric_number()
</code></p>
<p>returns "'Graph' object has no attribute 'edge_isoperimetric_number'"</p>
<p>(while </p>
<p><code>
edge_isoperimetric_number?
</code></p>
<p>returns "Object <code>edge_isoperimetric_number</code> not found."</p>
<p>So how do I load said algorithm for use?</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?answer=52417#post-id-52417There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.
Some instructions for usage of git for sage developement are here : https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development
Please read them carefully.
(1) First, git clone as you did, and then switch to the develop branch.
(2) create a new branch as a copy of "develop" using
git checkout develop -b some_branch_name_with_cheeger_inside
(3) Then
git pull origin public/ticket/21942
should work and then you will need to compile sage (takes time..)
You may need to configure "trac" as a remote server for gitSat, 11 Jul 2020 11:30:22 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?answer=52417#post-id-52417Comment by ARG for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52442#post-id-52442where should I post it? it's probably too long for a comment... Basically, I think the problem is that the name of my vertices is a list (e.g. [0,1,1,0]) which is then gone through a <code>Sequence(TheList,immutable=True)</code>Sun, 12 Jul 2020 22:20:51 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52442#post-id-52442Comment by ARG for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52443#post-id-52443Here is a "minimum bugging example":
<code>
vert = [ Sequence([i,i^2],immutable=True) for i in range(0,3)]; <br>
dico = dict([
[vert[0],[vert[1],vert[2]]],
[vert[1],[vert[0],vert[2]]],
[vert[2],[vert[1],vert[0]]],
]);<br>
G = Graph(dico);<br>
G.is_connected()
</code>Sun, 12 Jul 2020 22:33:12 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52443#post-id-52443Comment by David Coudert for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52448#post-id-52448`Sequence` derives from `list`, and many methods of the graph module consider lists as sets of vertices. So it's better to relabel the graph in this case.Mon, 13 Jul 2020 11:27:57 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52448#post-id-52448Comment by FrédéricC for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52422#post-id-52422and then
git pull trac public/ticket/21942Sat, 11 Jul 2020 12:44:36 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52422#post-id-52422Comment by David Coudert for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52437#post-id-52437Could you post the graph with labeling leading to an error ? If it's a bug, it can certainly be fixed.Sun, 12 Jul 2020 10:56:01 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52437#post-id-52437Comment by ARG for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52420#post-id-52420Thanks for pointing me in the right direction. At the moment, I get the error:
git_trac.trac_error.TracAuthenticationError: Authentication with trac server failed.
if I try <code>git trac config --user=myusername --pass=mypasswd</code> with my (usual) github usernames and passwords. Then I get the error
fatal: Couldn't find remote ref public/ticket/21942
upon doing <code>git pull origin public/ticket/21942</code> ...Sat, 11 Jul 2020 12:35:48 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52420#post-id-52420Comment by FrédéricC for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52421#post-id-52421Do not use "git trac". Rather do
git remote add trac git@trac.sagemath.org:sage.git -t masterSat, 11 Jul 2020 12:44:19 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52421#post-id-52421Comment by ARG for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52424#post-id-52424<code>git remote add trac git@trac.sagemath.org:sage.git -t master</code> printed out <code>fatal: remote trac already exists.</code> But then <code> git pull trac public/ticket/21942</code> worked, many thanks! I still need to compile ...Sat, 11 Jul 2020 13:15:05 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52424#post-id-52424Comment by ARG for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52431#post-id-52431Compiled and tested, many thanks again. Just a little "bug": the <code>is_connected()</code> function (which the Cheeger functions use) gave an error because it did not like how the vertices of my graph were labeled. After I ran <code>G.relabel()</code> everything went fine.Sat, 11 Jul 2020 23:20:39 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52431#post-id-52431Comment by ARG for <p>There is now a new branch without merge conflict on the trac ticket. So you "just" need to pull and compile. This is quite a task if you are not used to this process.</p>
<p>Some instructions for usage of git for sage developement are here : <a href="https://doc.sagemath.org/html/en/developer/index.html#git-for-sage-development">https://doc.sagemath.org/html/en/deve...</a>
Please read them carefully.</p>
<p>(1) First, git clone as you did, and then switch to the develop branch.</p>
<p>(2) create a new branch as a copy of "develop" using</p>
<pre><code>git checkout develop -b some_branch_name_with_cheeger_inside
</code></pre>
<p>(3) Then</p>
<pre><code>git pull origin public/ticket/21942
</code></pre>
<p>should work and then you will need to compile sage (takes time..)</p>
<p>You may need to configure "trac" as a remote server for git</p>
https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52450#post-id-52450Sure. In my actual example, it was way more easier to code the vertices as lists (to define the adjacency relation). I just wanted to point it out. Theoretically, one could implement that sage defines his own label (in the command <code>Graph</code> when it notices the vertices are given as lists. But that's not a high priority thing and it's messy. Perhaps just give a warning to the user?Mon, 13 Jul 2020 12:21:38 +0200https://ask.sagemath.org/question/52410/edge-isoperimetric-number/?comment=52450#post-id-52450