From: Jon Harrop on
What is the recommended way of doing this in Mathematica?

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com

From: Bob Hanlon on

gr1 = GraphPlot[{
1 -> 2, 2 -> 1, 3 -> 1, 3 -> 2,
4 -> 1, 4 -> 2, 4 -> 4},
DirectedEdges -> True]

gr2 = gr1 /. Arrow -> Line


Bob Hanlon

---- Jon Harrop <usenet(a)ffconsultancy.com> wrote:

=============
What is the recommended way of doing this in Mathematica?

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com


From: juan flores on
Dear Jon,

A plot is not a graph. You may use the following:

Needs["Combinatorica`"];
Needs["GraphUtilities`"];
gr1 =
ToCombinatoricaGraph[{1 -> 2, 2 -> 1, 3 -> 1, 3 -> 2, 4 -> 1, 4 -> 2,
4 -> 4}]
ShowGraph[gr1]
gr1u = MakeUndirected[gr1]
ShowGraph[gr1u]

Regards,

Juan

On Jul 22, 4:41 am, Bob Hanlon <hanl...(a)cox.net> wrote:
> gr1 = GraphPlot[{
> 1 -> 2, 2 -> 1, 3 -> 1, 3 -> 2,
> 4 -> 1, 4 -> 2, 4 -> 4},
> DirectedEdges -> True]
>
> gr2 = gr1 /. Arrow -> Line
>
> Bob Hanlon
>
> ---- Jon Harrop <use...(a)ffconsultancy.com> wrote:
>
> =============
> What is the recommended way of doing this in Mathematica?
>
> --
> Dr Jon Harrop, Flying Frog Consultancy Ltd.http://www.ffconsultancy.com


From: Jon Harrop on
Wonderful, thanks!

"Bob Hanlon" <hanlonr(a)cox.net> wrote in message
news:i293nk$m3i$1(a)smc.vnet.net...
>
> gr1 = GraphPlot[{
> 1 -> 2, 2 -> 1, 3 -> 1, 3 -> 2,
> 4 -> 1, 4 -> 2, 4 -> 4},
> DirectedEdges -> True]
>
> gr2 = gr1 /. Arrow -> Line
>
>
> Bob Hanlon
>
> ---- Jon Harrop <usenet(a)ffconsultancy.com> wrote:
>
> =============
> What is the recommended way of doing this in Mathematica?
>
> --
> Dr Jon Harrop, Flying Frog Consultancy Ltd.
> http://www.ffconsultancy.com
>
>


From: Robert Wright on
Bob, I suspect Jon is about to show us how this can be done with one alpha
character in F#


;-)

I considered updating my 1989 vintage Fortran skills recently and thought
the new parallel Fortran would be the way to go, however, Jon has certainly
made me wonder whether F# is a credible scientific workhorse. Every now and
then, I solve something in Mathematica and wish I had a faster computational
engine...especially when ploting vector fields. That said, it's not often I need
the extra speed and Mathematica does a fantastic job in most cases. Are others using F#,
and if so, what are your thoughts: is it a realistic replacement for Mathematica's
enormous functionality, or niche companion?

R




________________________________
From: Bob Hanlon <hanlonr(a)cox.net>
Sent: Thu, July 22, 2010 4:41:02 AM
Subject: Re: Convert directed graph to undirected graph


gr1 == GraphPlot[{
1 -> 2, 2 -> 1, 3 -> 1, 3 -> 2,
4 -> 1, 4 -> 2, 4 -> 4},
DirectedEdges -> True]

gr2 == gr1 /. Arrow -> Line


Bob Hanlon

---- Jon Harrop <usenet(a)ffconsultancy.com> wrote:

==========================
What is the recommended way of doing this in Mathematica?

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com


 |  Next  |  Last
Pages: 1 2
Prev: Misprint
Next: Help Mathematica simplify this