jgrapht-users Mailing List for JGraphT (Page 31)
Brought to you by:
barak_naveh,
perfecthash
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
2005 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(1) |
May
|
Jun
(12) |
Jul
(6) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2006 |
Jan
(4) |
Feb
(3) |
Mar
(2) |
Apr
(3) |
May
(6) |
Jun
(2) |
Jul
(3) |
Aug
(12) |
Sep
(6) |
Oct
(3) |
Nov
(12) |
Dec
|
2007 |
Jan
(6) |
Feb
|
Mar
(6) |
Apr
(8) |
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(3) |
Sep
(7) |
Oct
(3) |
Nov
|
Dec
(1) |
2008 |
Jan
(11) |
Feb
(4) |
Mar
(8) |
Apr
(3) |
May
(4) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(4) |
Nov
(5) |
Dec
(5) |
2009 |
Jan
(3) |
Feb
(12) |
Mar
(14) |
Apr
(9) |
May
(8) |
Jun
(1) |
Jul
(4) |
Aug
(10) |
Sep
|
Oct
(10) |
Nov
|
Dec
(4) |
2010 |
Jan
(9) |
Feb
(16) |
Mar
(14) |
Apr
(19) |
May
(1) |
Jun
(3) |
Jul
(17) |
Aug
(9) |
Sep
(4) |
Oct
(4) |
Nov
(11) |
Dec
(8) |
2011 |
Jan
(10) |
Feb
(11) |
Mar
(10) |
Apr
(14) |
May
(6) |
Jun
(8) |
Jul
(9) |
Aug
(11) |
Sep
(13) |
Oct
(7) |
Nov
(9) |
Dec
(1) |
2012 |
Jan
(5) |
Feb
(14) |
Mar
(4) |
Apr
(25) |
May
(18) |
Jun
(18) |
Jul
(3) |
Aug
(6) |
Sep
(3) |
Oct
(16) |
Nov
(5) |
Dec
(12) |
2013 |
Jan
(1) |
Feb
(6) |
Mar
(14) |
Apr
(34) |
May
(9) |
Jun
(3) |
Jul
(8) |
Aug
|
Sep
(10) |
Oct
(11) |
Nov
(11) |
Dec
(15) |
2014 |
Jan
(2) |
Feb
(6) |
Mar
(11) |
Apr
(12) |
May
(6) |
Jun
(7) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(5) |
Dec
(6) |
2015 |
Jan
(15) |
Feb
(4) |
Mar
(7) |
Apr
(8) |
May
(1) |
Jun
(18) |
Jul
(27) |
Aug
(13) |
Sep
(4) |
Oct
(8) |
Nov
(7) |
Dec
(6) |
2016 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(15) |
May
(5) |
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
(7) |
Oct
(2) |
Nov
(4) |
Dec
(2) |
2017 |
Jan
(7) |
Feb
(1) |
Mar
(17) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
(5) |
Dec
(6) |
2018 |
Jan
(23) |
Feb
(17) |
Mar
(4) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(5) |
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(5) |
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(8) |
Jul
(8) |
Aug
|
Sep
(2) |
Oct
(9) |
Nov
|
Dec
(1) |
2021 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(3) |
Nov
(1) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: seham m. <ss_...@ya...> - 2011-01-09 20:44:47
|
Dear Sir, I am now making a parser code for XSD documents. the results should be put in a tree data structure. Could you give me an implementation of a tree data structure such that it contains the following function: 1. every node can have more than one data item, a function to put that in a node. 1. every parent has any number of children (We build the tree from the parsing). 2. we can preorder and postorder the tree. 3. delete a node and get its parent[ to make a post order and delete the nodes one per one starting at the 1st node in the preorder and delete it and then get its parent] then put the nodes in an arraylist and the parents in another arraylist. 4. get siblings of the node. 5. get the ancestor path of any node 6. get the descendent path of any node 7. get the parent of any node This is what I want to do? may be there are other functions. CAN YOU HELP ME? (in Java code, please) Thanks \Seham \Seham --- On Sat, 1/8/11, Mansour Al Akeel <man...@gm...> wrote: > From: Mansour Al Akeel <man...@gm...> > Subject: Re: Fw: Re: Seham > To: "seham moawed" <ss_...@ya...> > Date: Saturday, January 8, 2011, 4:51 PM > Another thing I would like to ask you > about, what do you mean by "all > kind of schemas" ? And what do you mean all possible > strustures. > > On Sat Jan 08,2011 10:47 am, seham moawed wrote: > > > > Dear Eng.Mansour, > > look at the code I have done with XSOM, I > am sure it is not complete, I > > collect it from the codes appears in some > links for XSOM. Can you aid > > me to complete it to generalize it to all > kind of schemas? to all > > possible structures. > > package testxsd; > > import com.sun.xml.xsom.XSAttributeDecl; > > import com.sun.xml.xsom.XSAttributeUse; > > import java.io.File; > > import java.util.Iterator; > > import com.sun.xml.xsom.XSComplexType; > > import com.sun.xml.xsom.XSContentType; > > import com.sun.xml.xsom.XSElementDecl; > > import com.sun.xml.xsom.XSModelGroup; > > import com.sun.xml.xsom.XSParticle; > > import com.sun.xml.xsom.XSSchema; > > import com.sun.xml.xsom.XSSchemaSet; > > import com.sun.xml.xsom.XSTerm; > > import com.sun.xml.xsom.XSType; > > import > com.sun.xml.xsom.parser.XSOMParser; > > import java.util.Collection; > > /** > > * > > * @author soso > > */ > > public class TestXSD { > > public static void > parse(){ > > > try{ > > > XSOMParser parser = new XSOMParser(); > > > parser.parse(new File("C:/Documents and > > Settings/soso/Desktop/New > Folder/test.xsd")); > > > XSSchemaSet sset = parser.getResult(); > > > Iterator itr = sset.iterateSchema(); > > > while(itr.hasNext()) > > > { > > > XSSchema s = (XSSchema)itr.next(); > > > System.out.println("Target namespace: > > "+s.getTargetNamespace()); > > > Iterator jtr = s.iterateElementDecls(); > > > while( jtr.hasNext() ) { > > > XSElementDecl e = > (XSElementDecl)jtr.next(); > > > ProcessSchemaObject(e); > > > > > if( e.isAbstract() ) > > > > System.out.print(" (abstract)"); > > > > System.out.println(); > > > } > > > } > > > } > > > catch (Exception exp) { > > > exp.printStackTrace(System.out); > > } > > } > > public > static void ProcessSchemaObject(XSElementDecl e){ > > > XSType t = > e.getType(); > > > > if(t.isSimpleType()){ > > > System.out.println( > e.getName()); > > > System.out.println( > e.getType()); > > > > > } > > > > if(t.isComplexType()){ > > > System.out.println( > e.getName()); > > > XSComplexType > xsComplexType = (XSComplexType)t; > > > XSContentType > xsContentType = > > xsComplexType.getContentType(); > > > XSParticle particle = > xsContentType.asParticle(); > > > if(particle != null){ > > > XSTerm term = particle.getTerm(); > > > if(term.isModelGroup()){ > > > XSModelGroup xsModelGroup = term.asModelGroup(); > > > XSParticle[] particles = xsModelGroup.getChildren(); > > > for(XSParticle p : particles ){ > > > XSTerm pterm = p.getTerm(); > > > if(pterm.isElementDecl()){ //xs:element inside > complex > > type > > > //System.out.println(pterm); > > > final XSElementDecl x = > pterm.asElementDecl(); > > > ProcessSchemaObject(x); > > > > > } > > > } > > } > > } > > > > > > > Collection<? extends XSAttributeUse> > c = > > xsComplexType.getAttributeUses(); > > Iterator<? extends > XSAttributeUse> i = > > c.iterator();while(i.hasNext()){ > > > XSAttributeDecl attributeDecl = i.next().getDecl(); > > > System.out.println("name:"+attributeDecl.getName()); > > > System.out.println("type: "+attributeDecl.getType()); > > > > } > > > > > } > > > } > > > > > > > > /** > > * @param args > the command line arguments > > */ > > public static void > main(String[] args) { > > > > > parse(); > > } > > } > > the XSD is: > > <?xml version="1.0" > encoding="UTF-8"?> > > <schema xmlns = "http://www.w3.org/2001/XMLSchema" > > xmlns:target = "http://www.example.com/name" > > elementFormDefault = > "qualified"> > > <element > name="personaldata"> > > > <complexType> > > > <sequence> > > > <element name ="address" > > > > <complexType> > > > <choice> > > > <element name = "street" > type="string" /> > > > <element name = "country" > type="string" /> > > > </choice> > > > </complexType> > > > </element> > > > <element name ="fullname" > > > > <complexType> > > > <sequence> > > > <element name="first" > type="string"/> > > > <element name="middle" > type="string"/> > > > <element name="last" > type="string"/> > > > </sequence> > > > </complexType> > > > </element> > > > </sequence> > > <attribute > name="title" type ="string"/> > > > </complexType> > > </element> > > <element name="age" type > ="string"/> > > </schema> > > Could you do so??????????????? > > > > > Thanks > > > > > > \Seham > |
From: Hans-Martin A. <dr...@go...> - 2010-12-29 19:59:45
|
Thanks for the quick reply. I had overlooked that method signature. That solves my problem. Very nice indeed! Regards Hans-Martin Adorf On Wed, Dec 29, 2010 at 8:51 PM, John Sichi <js...@gm...> wrote: > Such a method already exists. > > http://www.jgrapht.org/javadoc/org/jgrapht/Graph.html#addEdge(V<http://www.jgrapht.org/javadoc/org/jgrapht/Graph.html#addEdge%28V>, > V, E) > > JVS > > On Wed, Dec 29, 2010 at 11:25 AM, Hans-Martin Adorf > <dr...@go...> wrote: > > Folks, > > > > today I explored JGraphT. The design allows me to use any Vertex object > that > > pleases me. I chose to define a class Vertex as > > > > public class Vertex<V> { > > private final V payload; > > public Vertex(V payload) { > > this.payload = payload; > > } > > public V getObject() { > > return payload; > > } > > @Override > > public String toString() { > > return payload.toString(); > > } > > } > > > > I would like to do the same for the edge. However, the design of JGraphT > > does not permit a design where I have full control over the edge. I > consider > > this to be a design flaw. I should like to be able to use an edge that > has a > > name, or in general a payload object. > > > > This could be achieved, if there were a method > > > > graph.addEdge(Edge edge) > > > > Edge would have to be an interface with two methods getSource() und > > getTarget(). > > > > Is there anything that stands in the way of such a design change? Why > does > > JGraphT have to have control over the constructor of my edge? > > > > Thanks. > > Dr. Hans-Martin Adorf > > > > > ------------------------------------------------------------------------------ > > Learn how Oracle Real Application Clusters (RAC) One Node allows > customers > > to consolidate database storage, standardize their database environment, > > and, > > should the need arise, upgrade to a full multi-node Oracle RAC database > > without downtime or disruption > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > jgrapht-users mailing list > > jgr...@li... > > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > > > > > |
From: John S. <js...@gm...> - 2010-12-29 19:51:10
|
Such a method already exists. http://www.jgrapht.org/javadoc/org/jgrapht/Graph.html#addEdge(V, V, E) JVS On Wed, Dec 29, 2010 at 11:25 AM, Hans-Martin Adorf <dr...@go...> wrote: > Folks, > > today I explored JGraphT. The design allows me to use any Vertex object that > pleases me. I chose to define a class Vertex as > > public class Vertex<V> { > private final V payload; > public Vertex(V payload) { > this.payload = payload; > } > public V getObject() { > return payload; > } > @Override > public String toString() { > return payload.toString(); > } > } > > I would like to do the same for the edge. However, the design of JGraphT > does not permit a design where I have full control over the edge. I consider > this to be a design flaw. I should like to be able to use an edge that has a > name, or in general a payload object. > > This could be achieved, if there were a method > > graph.addEdge(Edge edge) > > Edge would have to be an interface with two methods getSource() und > getTarget(). > > Is there anything that stands in the way of such a design change? Why does > JGraphT have to have control over the constructor of my edge? > > Thanks. > Dr. Hans-Martin Adorf > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > > |
From: Hans-Martin A. <dr...@go...> - 2010-12-29 19:25:50
|
Folks, today I explored JGraphT. The design allows me to use any Vertex object that pleases me. I chose to define a class Vertex as public class Vertex<V> { private final V payload; public Vertex(V payload) { this.payload = payload; } public V getObject() { return payload; } @Override public String toString() { return payload.toString(); } } I would like to do the same for the edge. However, the design of JGraphT does not permit a design where I have full control over the edge. I consider this to be a design flaw. I should like to be able to use an edge that has a name, or in general a payload object. This could be achieved, if there were a method graph.addEdge(Edge edge) Edge would have to be an interface with two methods getSource() und getTarget(). Is there anything that stands in the way of such a design change? Why does JGraphT have to have control over the constructor of my edge? Thanks. Dr. Hans-Martin Adorf |
From: Mohammed R. <moh...@gm...> - 2010-12-17 04:59:40
|
Hi all, I would like to implement kshortest path algorithm in my program. Anyone please tell me about demo code and good tutorial to learn jgraphT kshortest path algorithm for that. I cannot find good documentation other than javadocs Any help will be greatly appreciated Thanks in advance. -- Rashad |
From: Diego O. <die...@gm...> - 2010-12-08 14:45:11
|
I needed to change some lines of code to use JGRAPHT with SWING, I want to share with you the code example of the page: package animation; import java.awt.Color; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.geom.Rectangle2D; import java.util.HashMap; import java.util.Map; import org.jgraph.JGraph; import org.jgraph.graph.DefaultGraphCell; import org.jgraph.graph.GraphConstants; import org.jgrapht.ListenableGraph; import org.jgrapht.ext.JGraphModelAdapter; import org.jgrapht.graph.DefaultEdge; import org.jgrapht.graph.ListenableDirectedGraph; /** * @author diego */ public class Graph { private static final Dimension DEFAULT_SIZE = new Dimension(530, 320); private JGraphModelAdapter m_jgAdapter; private JGraph jgraph = null; /** * @see java.applet.Applet#init(). */ public void run() { // create a JGraphT graph ListenableGraph g = new ListenableDirectedGraph(DefaultEdge.class); // create a visualization using JGraph, via an adapter m_jgAdapter = new JGraphModelAdapter(g); jgraph = new JGraph(m_jgAdapter); adjustDisplaySettings(jgraph); // add some sample data (graph manipulated via JGraphT) g.addVertex("v1"); g.addVertex("v2"); g.addVertex("v3"); g.addVertex("v4"); g.addEdge("v1", "v2"); g.addEdge("v2", "v3"); g.addEdge("v3", "v1"); g.addEdge("v4", "v3"); // position vertices nicely within JGraph component positionVertexAt("v1", 130, 40); positionVertexAt("v2", 60, 200); positionVertexAt("v3", 310, 230); positionVertexAt("v4", 380, 70); // that's all there is to it!... } private void adjustDisplaySettings(JGraph jg) { jg.setPreferredSize(DEFAULT_SIZE); jg.setBackground(Color.GRAY); } private void positionVertexAt(Object vertex, int x, int y) { DefaultGraphCell cell = m_jgAdapter.getVertexCell(vertex); Map attr = cell.getAttributes(); Rectangle2D b = GraphConstants.getBounds(attr); GraphConstants.setBounds(attr, new Rectangle(x, y, (int) b.getWidth(), (int) b.getHeight())); Map cellAttr = new HashMap(); cellAttr.put(cell, attr); m_jgAdapter.edit(cellAttr, null, null, null); } public JGraph getJgraph() { return jgraph; } public void setJgraph(JGraph jgraph) { this.jgraph = jgraph; } } ********************************************** and to RUN it package animation; import javax.swing.JFrame; import javax.swing.JPanel; import org.jgraph.JGraph; /** * @author diego */ public class TestGra { public static void main(String[] args) { JFrame f = new JFrame(); f.setSize(500, 500); JPanel p = new JPanel(); p.setSize(500, 500); Graph g = new Graph(); g.run(); JGraph jg = g.getJgraph(); p.add(jg); f.add(p); f.setVisible(true); } } *********************************************************** I hope it help the beginners. I'm using JGraph to animate Formal Languages. -- Diego Oliveira Mestrado em Sistemas e Computação UFRN |
From: John S. <js...@gm...> - 2010-12-03 07:01:12
|
It's a bit hard to iterate without a loop, no? JVS On Thu, Dec 2, 2010 at 8:02 AM, Oliver Schrenk <oli...@gm...> wrote: > I need to completely traverse a graph. BreadthFirstIterator seemed fine as the JavaDoc says : > >> If the specified start vertex is <code>null</code>, iteration will start at an arbitrary vertex and will not be limited, that is, will be able to traverse all the graph > > The following code will traverse only the first vertex though and will then stop: > > package com.acme.jgrapht; > > import org.jgrapht.UndirectedGraph; > import org.jgrapht.graph.WeightedMultigraph; > import org.jgrapht.traverse.BreadthFirstIterator; > > public class GraphTester { > > public static void main(String[] args) { > GraphTester graphTester = new GraphTester(); > graphTester.iterate(); > } > > private final UndirectedGraph<Vertex, Edge> graph; > > private void iterate() { > BreadthFirstIterator<Vertex, Edge> traverser = new BreadthFirstIterator<Vertex, Edge>(graph, null); > if (traverser.hasNext()) { > Vertex v = traverser.next(); > System.out.println(v); > } > } > > public GraphTester() { > graph = new WeightedMultigraph<Vertex, Edge>(Edge.class); > graph.addVertex(new Vertex(0)); > graph.addVertex(new Vertex(1)); > graph.addVertex(new Vertex(2)); > graph.addVertex(new Vertex(3)); > } > > final class Edge { > > } > > final class Vertex { > > int id; > > public Vertex(int id) { > super(); > this.id = id; > } > > public int getId() { > return id; > } > > @Override > public int hashCode() { > final int prime = 31; > int result = 1; > result = prime * result + id; > return result; > } > > @Override > public boolean equals(Object obj) { > if (this == obj) > return true; > if (obj == null) > return false; > if (!(obj instanceof Vertex)) > return false; > Vertex other = (Vertex) obj; > if (id != other.id) > return false; > return true; > } > > @Override > public String toString() { > return "Vertex [id=" + id + "]"; > } > > } > > } > > > What can I do? > > Best regards > Oliver Schrenk > > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |
From: John S. <js...@gm...> - 2010-12-03 06:57:32
|
A couple of users have encountered a regression in DOTExporter: https://sourceforge.net/tracker/?func=detail&atid=579687&aid=3125176&group_id=86459 Apologies for the oversight; we'll get this corrected in the next release. JVS |
From: Oliver S. <oli...@gm...> - 2010-12-02 16:02:38
|
I need to completely traverse a graph. BreadthFirstIterator seemed fine as the JavaDoc says : > If the specified start vertex is <code>null</code>, iteration will start at an arbitrary vertex and will not be limited, that is, will be able to traverse all the graph The following code will traverse only the first vertex though and will then stop: package com.acme.jgrapht; import org.jgrapht.UndirectedGraph; import org.jgrapht.graph.WeightedMultigraph; import org.jgrapht.traverse.BreadthFirstIterator; public class GraphTester { public static void main(String[] args) { GraphTester graphTester = new GraphTester(); graphTester.iterate(); } private final UndirectedGraph<Vertex, Edge> graph; private void iterate() { BreadthFirstIterator<Vertex, Edge> traverser = new BreadthFirstIterator<Vertex, Edge>(graph, null); if (traverser.hasNext()) { Vertex v = traverser.next(); System.out.println(v); } } public GraphTester() { graph = new WeightedMultigraph<Vertex, Edge>(Edge.class); graph.addVertex(new Vertex(0)); graph.addVertex(new Vertex(1)); graph.addVertex(new Vertex(2)); graph.addVertex(new Vertex(3)); } final class Edge { } final class Vertex { int id; public Vertex(int id) { super(); this.id = id; } public int getId() { return id; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + id; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof Vertex)) return false; Vertex other = (Vertex) obj; if (id != other.id) return false; return true; } @Override public String toString() { return "Vertex [id=" + id + "]"; } } } What can I do? Best regards Oliver Schrenk |
From: John S. <js...@gm...> - 2010-11-29 23:26:15
|
Oops, sorry, I sent out a broken link to the old wiki. Here's the correct location: http://pub.eigenbase.org/wiki/JGraphT:Release0.8.2 JVS On Sat, Nov 27, 2010 at 10:05 PM, John Sichi <js...@gm...> wrote: > This release includes a number of bugfixes and contributions which > have accumulated since the 0.8.1 release. You can find a description > of the changes here: > > http://jgrapht.wikispaces.com/Release0.8.2 > > We're working on getting jars uploaded to Maven Central Repository as > well, but that will take a little while longer. > > Big thanks to all who made suggestions and code contributions for this > release. > > JVS > |
From: John S. <js...@gm...> - 2010-11-28 06:05:52
|
This release includes a number of bugfixes and contributions which have accumulated since the 0.8.1 release. You can find a description of the changes here: http://jgrapht.wikispaces.com/Release0.8.2 We're working on getting jars uploaded to Maven Central Repository as well, but that will take a little while longer. Big thanks to all who made suggestions and code contributions for this release. JVS |
From: John S. <js...@gm...> - 2010-11-28 05:20:43
|
I've added a new ant target maven.pom which generates pom.xml from the template. I'm going to proceed with the 0.8.2 release using the old mavenless procedure, and then work on getting jars uploaded to the Maven Central Repository (this will probably require some more pom tweaking). JVS On Thu, Nov 4, 2010 at 2:51 PM, John Sichi <js...@gm...> wrote: > I tested this out (compile/test/package) and it all worked. For now, > I've committed it to etc/pom.xml.template since I might add an ant > target to generate it for the release (at which time I'll figure out > the best place to upload it). Thanks again Adrian! > > JVS > > On Mon, Oct 25, 2010 at 8:18 AM, Adrian Marte <adr...@st...> wrote: >> Hey, >> >> In response to "jgrapht 0.8.0 in maven" [1], I have created a preliminary >> version of a POM file that could be used to build the JGraphT project using >> Maven. >> >> The POM file defines the same group and artifact ID as for the version >> (07.3.) already deployed in a Maven repository. The POM file does not use >> the Ant build file for the compile and release process, but uses Maven >> plugins to compile the code and run JUnit tests. The file also uses Maven's >> dependency mechanisms to include third party libraries, at least where >> possible. For JGraph I found version 5.13.0.0 in a global Maven repository, >> e.g. [2], for TouchGraph I did not find a Maven compatible distribution and, >> therefore, I excluded the corresponding experimental classes from the >> compile process. >> >> In order to be compatible with the release process, this file needs to be >> put in the SVN trunk and also in any tag created from the trunk. Make sure >> that the version in the POM file reflects the version in the trunk or tag. >> For releasing a new version, we could use the Maven distribution mechanism, >> but for this we would also need a Maven repository where we can upload the >> binaries to. I have seen some open source projects, where they have created >> their own Maven repository inside the SVN repository, for instance Any23 >> [3]. >> >> Regards, >> Adrian >> >> [1] >> https://sourceforge.net/mailarchive/message.php?msg_id=49261D94.20704%40gmail.com >> [2] http://mvnrepository.com/artifact/jgraph/jgraph/5.13.0.0 >> [3] http://code.google.com/p/any23/source/browse/ >> >> See below the POM file: >> >> <project xmlns="http://maven.apache.org/POM/4.0.0" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >> http://maven.apache.org/xsd/maven-4.0.0.xsd"> >> <modelVersion>4.0.0</modelVersion> >> >> <groupId>org.jgrapht</groupId> >> <artifactId>jgrapht</artifactId> >> <version>0.8.2-SNAPSHOT</version> >> <name>JGraphT</name> >> >> <properties> >> <!-- The compiler version to use. --> >> <compiler.version>1.6</compiler.version> >> >> <!-- The JGraph version. --> >> <jgraph.version>5.13.0.0</jgraph.version> >> >> <jgrapht.sourceDirectory>${basedir}/src</jgrapht.sourceDirectory> >> >> <jgrapht.testSourceDirectory>${basedir}/testsrc</jgrapht.testSourceDirectory> >> >> <jgrapht.touchgraph.filter>org/jgrapht/experimental/touchgraph/**/*.java</jgrapht.touchgraph.filter> >> >> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> >> >> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> >> </properties> >> >> <dependencies> >> <dependency> >> <groupId>jgraph</groupId> >> <artifactId>jgraph</artifactId> >> <version>${jgraph.version}</version> >> </dependency> >> >> <dependency> >> <groupId>xmlunit</groupId> >> <artifactId>xmlunit</artifactId> >> <version>1.3</version> >> <scope>test</scope> >> </dependency> >> >> <dependency> >> <groupId>junit</groupId> >> <artifactId>junit</artifactId> >> <version>4.8.1</version> >> <scope>test</scope> >> </dependency> >> </dependencies> >> >> <build> >> <sourceDirectory>${jgrapht.sourceDirectory}</sourceDirectory> >> >> <testSourceDirectory>${jgrapht.testSourceDirectory}</testSourceDirectory> >> >> <plugins> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-compiler-plugin</artifactId> >> <version>2.3.2</version> >> <configuration> >> <source>${compiler.version}</source> >> <target>${compiler.version}</target> >> <excludes> >> <!-- Currently we need to exclude the TouchGraph >> support, since there >> is no Maven compatible binary distribution yet. >> --> >> <exclude>${jgrapht.touchgraph.filter}</exclude> >> </excludes> >> </configuration> >> </plugin> >> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-surefire-plugin</artifactId> >> <version>2.6</version> >> <configuration> >> <testFailureIgnore>false</testFailureIgnore> >> </configuration> >> </plugin> >> </plugins> >> </build> >> </project> >> >> ------------------------------------------------------------------------------ >> Nokia and AT&T present the 2010 Calling All Innovators-North America contest >> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada >> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing >> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store >> http://p.sf.net/sfu/nokia-dev2dev >> _______________________________________________ >> jgrapht-users mailing list >> jgr...@li... >> https://lists.sourceforge.net/lists/listinfo/jgrapht-users >> >> > |
From: John S. <js...@gm...> - 2010-11-16 04:04:31
|
Mathematically, a graph is a pair of sets (vertices and edges), so we model it on java.util.Set, which has the same behavior (regardless of hash vs tree, you can't change keys after adding them). If you want mutability, you should define a containing class which uses the default object identity hash code and supply that as your vertex class; hang the set as a data member. We have an existing wiki page on this topic; I'll add a link to it from the Javadoc: http://pub.eigenbase.org/wiki/JGraphT:EqualsAndHashCode JVS On Mon, Nov 15, 2010 at 6:37 PM, Jonathan Cederberg <jon...@it...> wrote: > Exactly what I thought. But... is this really what a graph should be? I mean, there is no hint in the docs as far as I can see, and although I know it is not good practice to change things in a collection from the outside, it still seems like something you might want to do. In particular if the graph represents some meta level info... > > /J > > On 16 nov 2010, at 03.18, John Sichi wrote: > >> Hi Jonathan, >> >> s2 is a mutable object, and you changed it after adding it to the >> graph. That's why you got unexpected results. >> >> See the section "Good keys" in this article: >> >> http://www.ibm.com/developerworks/java/library/j-jtp02183.html >> >> JVS >> >> On Mon, Nov 15, 2010 at 5:23 PM, Jonathan Cederberg >> <jon...@it...> wrote: >>> I am a huge fan of jgrapht. However, I have come across a problem with it. >>> My understanding is that that the code below should work, but it doesn't. I >>> have not dug into the source, but I can imagine that there is a hashcode >>> issue, as it no longer seem to find the vertex that is there. >>> I am not sure if I have read the docs wrong, programmed wrong, or if this is >>> simply a bug. The latter seems unlikely though, since it is such a core >>> feature that this type of problem should have been caught long ago. >>> Thanks in advance for any help! >>> /Jonathan >>> >>> import java.util.LinkedHashSet; >>> import java.util.Set; >>> import org.jgrapht.graph.DefaultEdge; >>> import org.jgrapht.graph.SimpleGraph; >>> public class Main { >>> /** >>> * @param args >>> */ >>> public static void main(String[] args) { >>> SimpleGraph<Set<String>, DefaultEdge> sg = >>> new SimpleGraph<Set<String>, DefaultEdge>(DefaultEdge.class); >>> >>> Set<String> s1, s2; >>> s2 = new LinkedHashSet<String>(); >>> s2.add("y"); >>> s2.add("z"); >>> >>> sg.addVertex(s2); >>> >>> s2.remove("z"); >>> >>> // this is true, as expected >>> assert(sg.vertexSet().size()==1) : "There is no vertex any more."; >>> assert(sg.vertexSet().iterator().next()==s2) : "Not the same vertex!"; >>> >>> // but this is false! >>> assert(sg.containsVertex(s2)) : "The vertex is gone!"; >>> } >>> } >>> >>> ------------------------------------------------------------------------------ >>> Beautiful is writing same markup. Internet Explorer 9 supports >>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >>> Spend less time writing and rewriting code and more time creating great >>> experiences on the web. Be a part of the beta today >>> http://p.sf.net/sfu/msIE9-sfdev2dev >>> _______________________________________________ >>> jgrapht-users mailing list >>> jgr...@li... >>> https://lists.sourceforge.net/lists/listinfo/jgrapht-users >>> >>> > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |
From: Jonathan C. <jon...@it...> - 2010-11-16 02:37:46
|
Exactly what I thought. But... is this really what a graph should be? I mean, there is no hint in the docs as far as I can see, and although I know it is not good practice to change things in a collection from the outside, it still seems like something you might want to do. In particular if the graph represents some meta level info... /J On 16 nov 2010, at 03.18, John Sichi wrote: > Hi Jonathan, > > s2 is a mutable object, and you changed it after adding it to the > graph. That's why you got unexpected results. > > See the section "Good keys" in this article: > > http://www.ibm.com/developerworks/java/library/j-jtp02183.html > > JVS > > On Mon, Nov 15, 2010 at 5:23 PM, Jonathan Cederberg > <jon...@it...> wrote: >> I am a huge fan of jgrapht. However, I have come across a problem with it. >> My understanding is that that the code below should work, but it doesn't. I >> have not dug into the source, but I can imagine that there is a hashcode >> issue, as it no longer seem to find the vertex that is there. >> I am not sure if I have read the docs wrong, programmed wrong, or if this is >> simply a bug. The latter seems unlikely though, since it is such a core >> feature that this type of problem should have been caught long ago. >> Thanks in advance for any help! >> /Jonathan >> >> import java.util.LinkedHashSet; >> import java.util.Set; >> import org.jgrapht.graph.DefaultEdge; >> import org.jgrapht.graph.SimpleGraph; >> public class Main { >> /** >> * @param args >> */ >> public static void main(String[] args) { >> SimpleGraph<Set<String>, DefaultEdge> sg = >> new SimpleGraph<Set<String>, DefaultEdge>(DefaultEdge.class); >> >> Set<String> s1, s2; >> s2 = new LinkedHashSet<String>(); >> s2.add("y"); >> s2.add("z"); >> >> sg.addVertex(s2); >> >> s2.remove("z"); >> >> // this is true, as expected >> assert(sg.vertexSet().size()==1) : "There is no vertex any more."; >> assert(sg.vertexSet().iterator().next()==s2) : "Not the same vertex!"; >> >> // but this is false! >> assert(sg.containsVertex(s2)) : "The vertex is gone!"; >> } >> } >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> jgrapht-users mailing list >> jgr...@li... >> https://lists.sourceforge.net/lists/listinfo/jgrapht-users >> >> |
From: John S. <js...@gm...> - 2010-11-16 02:18:39
|
Hi Jonathan, s2 is a mutable object, and you changed it after adding it to the graph. That's why you got unexpected results. See the section "Good keys" in this article: http://www.ibm.com/developerworks/java/library/j-jtp02183.html JVS On Mon, Nov 15, 2010 at 5:23 PM, Jonathan Cederberg <jon...@it...> wrote: > I am a huge fan of jgrapht. However, I have come across a problem with it. > My understanding is that that the code below should work, but it doesn't. I > have not dug into the source, but I can imagine that there is a hashcode > issue, as it no longer seem to find the vertex that is there. > I am not sure if I have read the docs wrong, programmed wrong, or if this is > simply a bug. The latter seems unlikely though, since it is such a core > feature that this type of problem should have been caught long ago. > Thanks in advance for any help! > /Jonathan > > import java.util.LinkedHashSet; > import java.util.Set; > import org.jgrapht.graph.DefaultEdge; > import org.jgrapht.graph.SimpleGraph; > public class Main { > /** > * @param args > */ > public static void main(String[] args) { > SimpleGraph<Set<String>, DefaultEdge> sg = > new SimpleGraph<Set<String>, DefaultEdge>(DefaultEdge.class); > > Set<String> s1, s2; > s2 = new LinkedHashSet<String>(); > s2.add("y"); > s2.add("z"); > > sg.addVertex(s2); > > s2.remove("z"); > > // this is true, as expected > assert(sg.vertexSet().size()==1) : "There is no vertex any more."; > assert(sg.vertexSet().iterator().next()==s2) : "Not the same vertex!"; > > // but this is false! > assert(sg.containsVertex(s2)) : "The vertex is gone!"; > } > } > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > > |
From: Jonathan C. <jon...@it...> - 2010-11-16 01:41:11
|
I am a huge fan of jgrapht. However, I have come across a problem with it. My understanding is that that the code below should work, but it doesn't. I have not dug into the source, but I can imagine that there is a hashcode issue, as it no longer seem to find the vertex that is there. I am not sure if I have read the docs wrong, programmed wrong, or if this is simply a bug. The latter seems unlikely though, since it is such a core feature that this type of problem should have been caught long ago. Thanks in advance for any help! /Jonathan import java.util.LinkedHashSet; import java.util.Set; import org.jgrapht.graph.DefaultEdge; import org.jgrapht.graph.SimpleGraph; public class Main { /** * @param args */ public static void main(String[] args) { SimpleGraph<Set<String>, DefaultEdge> sg = new SimpleGraph<Set<String>, DefaultEdge>(DefaultEdge.class); Set<String> s1, s2; s2 = new LinkedHashSet<String>(); s2.add("y"); s2.add("z"); sg.addVertex(s2); s2.remove("z"); // this is true, as expected assert(sg.vertexSet().size()==1) : "There is no vertex any more."; assert(sg.vertexSet().iterator().next()==s2) : "Not the same vertex!"; // but this is false! assert(sg.containsVertex(s2)) : "The vertex is gone!"; } } |
From: Jan v. R. <jan...@gm...> - 2010-11-11 09:02:04
|
Hi, my sincere apologies! I looked in the wrong jar file, the jgraph file (on which jgrapht relies). Thanks for the reaction anyway. Bye, Jan 2010/11/6 John Sichi <js...@gm...> > +jgrapht-users mailing list > > Hi Jan, > > I don't understand your question. The latest released version is > 0.8.1, and I just verified that the download tarball/zip and online > Javadoc match that version. Could you explain your problem further? > > JVS > > On Fri, Nov 5, 2010 at 4:33 AM, Jan van Rijn <jan...@gm...> wrote: > > Hi, > > > > I'm trying to download the newest version of JGraphT from the link on > your > > site to SourceForge, > > but unfortunately the version I get does not match with the one described > in > > your JavaDocs. > > Also when I download older versions, this problem occurs. Is there any > way > > this can be fixed? > > > > Bye, > > Jan > > > |
From: John S. <js...@gm...> - 2010-11-06 05:12:29
|
+jgrapht-users mailing list Hi Jan, I don't understand your question. The latest released version is 0.8.1, and I just verified that the download tarball/zip and online Javadoc match that version. Could you explain your problem further? JVS On Fri, Nov 5, 2010 at 4:33 AM, Jan van Rijn <jan...@gm...> wrote: > Hi, > > I'm trying to download the newest version of JGraphT from the link on your > site to SourceForge, > but unfortunately the version I get does not match with the one described in > your JavaDocs. > Also when I download older versions, this problem occurs. Is there any way > this can be fixed? > > Bye, > Jan > |
From: John S. <js...@gm...> - 2010-11-04 21:51:25
|
I tested this out (compile/test/package) and it all worked. For now, I've committed it to etc/pom.xml.template since I might add an ant target to generate it for the release (at which time I'll figure out the best place to upload it). Thanks again Adrian! JVS On Mon, Oct 25, 2010 at 8:18 AM, Adrian Marte <adr...@st...> wrote: > Hey, > > In response to "jgrapht 0.8.0 in maven" [1], I have created a preliminary > version of a POM file that could be used to build the JGraphT project using > Maven. > > The POM file defines the same group and artifact ID as for the version > (07.3.) already deployed in a Maven repository. The POM file does not use > the Ant build file for the compile and release process, but uses Maven > plugins to compile the code and run JUnit tests. The file also uses Maven's > dependency mechanisms to include third party libraries, at least where > possible. For JGraph I found version 5.13.0.0 in a global Maven repository, > e.g. [2], for TouchGraph I did not find a Maven compatible distribution and, > therefore, I excluded the corresponding experimental classes from the > compile process. > > In order to be compatible with the release process, this file needs to be > put in the SVN trunk and also in any tag created from the trunk. Make sure > that the version in the POM file reflects the version in the trunk or tag. > For releasing a new version, we could use the Maven distribution mechanism, > but for this we would also need a Maven repository where we can upload the > binaries to. I have seen some open source projects, where they have created > their own Maven repository inside the SVN repository, for instance Any23 > [3]. > > Regards, > Adrian > > [1] > https://sourceforge.net/mailarchive/message.php?msg_id=49261D94.20704%40gmail.com > [2] http://mvnrepository.com/artifact/jgraph/jgraph/5.13.0.0 > [3] http://code.google.com/p/any23/source/browse/ > > See below the POM file: > > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > > <groupId>org.jgrapht</groupId> > <artifactId>jgrapht</artifactId> > <version>0.8.2-SNAPSHOT</version> > <name>JGraphT</name> > > <properties> > <!-- The compiler version to use. --> > <compiler.version>1.6</compiler.version> > > <!-- The JGraph version. --> > <jgraph.version>5.13.0.0</jgraph.version> > > <jgrapht.sourceDirectory>${basedir}/src</jgrapht.sourceDirectory> > > <jgrapht.testSourceDirectory>${basedir}/testsrc</jgrapht.testSourceDirectory> > > <jgrapht.touchgraph.filter>org/jgrapht/experimental/touchgraph/**/*.java</jgrapht.touchgraph.filter> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > > <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> > </properties> > > <dependencies> > <dependency> > <groupId>jgraph</groupId> > <artifactId>jgraph</artifactId> > <version>${jgraph.version}</version> > </dependency> > > <dependency> > <groupId>xmlunit</groupId> > <artifactId>xmlunit</artifactId> > <version>1.3</version> > <scope>test</scope> > </dependency> > > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.8.1</version> > <scope>test</scope> > </dependency> > </dependencies> > > <build> > <sourceDirectory>${jgrapht.sourceDirectory}</sourceDirectory> > > <testSourceDirectory>${jgrapht.testSourceDirectory}</testSourceDirectory> > > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.3.2</version> > <configuration> > <source>${compiler.version}</source> > <target>${compiler.version}</target> > <excludes> > <!-- Currently we need to exclude the TouchGraph > support, since there > is no Maven compatible binary distribution yet. > --> > <exclude>${jgrapht.touchgraph.filter}</exclude> > </excludes> > </configuration> > </plugin> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>2.6</version> > <configuration> > <testFailureIgnore>false</testFailureIgnore> > </configuration> > </plugin> > </plugins> > </build> > </project> > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > > |
From: Dzianis L. <Dzi...@ex...> - 2010-11-04 16:55:53
|
Could you please upload the latest releases to maven central repository. How long does it takes you? -- Dzianis Liauchuk | Programmer | dzi...@ex...<mailto:dzi...@ex...%7C> Exigen Services | 25 Kalvariyskaya St. | Minsk | 220073 | Belarus | Phone: +375.17.252-5572 | Skype: dzianis.liauchuk | www.exigenservices.com<http://www.exigenservices.com/> | www.offshoreagile.com<http://www.offshoreagile.com/> | |
From: John S. <js...@gm...> - 2010-10-29 17:53:52
|
http://www.jgrapht.org/javadoc/org/jgrapht/Graph.html#getEdgeSource(E) JVS On Wed, Oct 27, 2010 at 9:50 PM, Kuan Yang <yan...@gm...> wrote: > Hi all, > > I am having problem accessing these two methods in all edge classes > since they are protected. > My scenario is that, by some way I get a list of edges, e.g. > shortestPath, and then I want to process the edges one by one. By > processing I mean I need to at least know the source and target of > each edge. > > I don't want to write a parser to parse the output from the > toString(), since the node name can get very messy in my case. I just > want a clean way to grab the source and target information for each > edge. > > Can anyone help? Thanks in advance. > > Kuan > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |
From: Kuan Y. <yan...@gm...> - 2010-10-28 04:50:21
|
Hi all, I am having problem accessing these two methods in all edge classes since they are protected. My scenario is that, by some way I get a list of edges, e.g. shortestPath, and then I want to process the edges one by one. By processing I mean I need to at least know the source and target of each edge. I don't want to write a parser to parse the output from the toString(), since the node name can get very messy in my case. I just want a clean way to grab the source and target information for each edge. Can anyone help? Thanks in advance. Kuan |
From: John S. <js...@gm...> - 2010-10-27 19:23:51
|
Thanks Adrian, I'll take a look and see if we can get this integrated into the release process somehow. JVS On Mon, Oct 25, 2010 at 5:18 AM, Adrian Marte <adr...@st...> wrote: > Hey, > > In response to "jgrapht 0.8.0 in maven" [1], I have created a preliminary > version of a POM file that could be used to build the JGraphT project using > Maven. > > The POM file defines the same group and artifact ID as for the version > (07.3.) already deployed in a Maven repository. The POM file does not use > the Ant build file for the compile and release process, but uses Maven > plugins to compile the code and run JUnit tests. The file also uses Maven's > dependency mechanisms to include third party libraries, at least where > possible. For JGraph I found version 5.13.0.0 in a global Maven repository, > e.g. [2], for TouchGraph I did not find a Maven compatible distribution and, > therefore, I excluded the corresponding experimental classes from the > compile process. > > In order to be compatible with the release process, this file needs to be > put in the SVN trunk and also in any tag created from the trunk. Make sure > that the version in the POM file reflects the version in the trunk or tag. > For releasing a new version, we could use the Maven distribution mechanism, > but for this we would also need a Maven repository where we can upload the > binaries to. I have seen some open source projects, where they have created > their own Maven repository inside the SVN repository, for instance Any23 > [3]. > > Regards, > Adrian > > [1] > https://sourceforge.net/mailarchive/message.php?msg_id=49261D94.20704%40gmail.com > [2] http://mvnrepository.com/artifact/jgraph/jgraph/5.13.0.0 > [3] http://code.google.com/p/any23/source/browse/ > > See below the POM file: > > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > > <groupId>org.jgrapht</groupId> > <artifactId>jgrapht</artifactId> > <version>0.8.2-SNAPSHOT</version> > <name>JGraphT</name> > > <properties> > <!-- The compiler version to use. --> > <compiler.version>1.6</compiler.version> > > <!-- The JGraph version. --> > <jgraph.version>5.13.0.0</jgraph.version> > > <jgrapht.sourceDirectory>${basedir}/src</jgrapht.sourceDirectory> > > <jgrapht.testSourceDirectory>${basedir}/testsrc</jgrapht.testSourceDirectory> > > <jgrapht.touchgraph.filter>org/jgrapht/experimental/touchgraph/**/*.java</jgrapht.touchgraph.filter> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > > <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> > </properties> > > <dependencies> > <dependency> > <groupId>jgraph</groupId> > <artifactId>jgraph</artifactId> > <version>${jgraph.version}</version> > </dependency> > > <dependency> > <groupId>xmlunit</groupId> > <artifactId>xmlunit</artifactId> > <version>1.3</version> > <scope>test</scope> > </dependency> > > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.8.1</version> > <scope>test</scope> > </dependency> > </dependencies> > > <build> > <sourceDirectory>${jgrapht.sourceDirectory}</sourceDirectory> > > <testSourceDirectory>${jgrapht.testSourceDirectory}</testSourceDirectory> > > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.3.2</version> > <configuration> > <source>${compiler.version}</source> > <target>${compiler.version}</target> > <excludes> > <!-- Currently we need to exclude the TouchGraph > support, since there > is no Maven compatible binary distribution yet. > --> > <exclude>${jgrapht.touchgraph.filter}</exclude> > </excludes> > </configuration> > </plugin> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>2.6</version> > <configuration> > <testFailureIgnore>false</testFailureIgnore> > </configuration> > </plugin> > </plugins> > </build> > </project> > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > > |
From: Adrian M. <adr...@st...> - 2010-10-25 12:19:08
|
Hey, In response to "jgrapht 0.8.0 in maven" [1], I have created a preliminary version of a POM file that could be used to build the JGraphT project using Maven. The POM file defines the same group and artifact ID as for the version (07.3.) already deployed in a Maven repository. The POM file does not use the Ant build file for the compile and release process, but uses Maven plugins to compile the code and run JUnit tests. The file also uses Maven's dependency mechanisms to include third party libraries, at least where possible. For JGraph I found version 5.13.0.0 in a global Maven repository, e.g. [2], for TouchGraph I did not find a Maven compatible distribution and, therefore, I excluded the corresponding experimental classes from the compile process. In order to be compatible with the release process, this file needs to be put in the SVN trunk and also in any tag created from the trunk. Make sure that the version in the POM file reflects the version in the trunk or tag. For releasing a new version, we could use the Maven distribution mechanism, but for this we would also need a Maven repository where we can upload the binaries to. I have seen some open source projects, where they have created their own Maven repository inside the SVN repository, for instance Any23 [3]. Regards, Adrian [1] https://sourceforge.net/mailarchive/message.php?msg_id=49261D94.20704%40gmail.com [2] http://mvnrepository.com/artifact/jgraph/jgraph/5.13.0.0 [3] http://code.google.com/p/any23/source/browse/ See below the POM file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.jgrapht</groupId> <artifactId>jgrapht</artifactId> <version>0.8.2-SNAPSHOT</version> <name>JGraphT</name> <properties> <!-- The compiler version to use. --> <compiler.version>1.6</compiler.version> <!-- The JGraph version. --> <jgraph.version>5.13.0.0</jgraph.version> <jgrapht.sourceDirectory>${basedir}/src</jgrapht.sourceDirectory> <jgrapht.testSourceDirectory>${basedir}/testsrc</jgrapht.testSourceDirectory> <jgrapht.touchgraph.filter>org/jgrapht/experimental/touchgraph/**/*.java</jgrapht.touchgraph.filter> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> </properties> <dependencies> <dependency> <groupId>jgraph</groupId> <artifactId>jgraph</artifactId> <version>${jgraph.version}</version> </dependency> <dependency> <groupId>xmlunit</groupId> <artifactId>xmlunit</artifactId> <version>1.3</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <sourceDirectory>${jgrapht.sourceDirectory}</sourceDirectory> <testSourceDirectory>${jgrapht.testSourceDirectory}</testSourceDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>${compiler.version}</source> <target>${compiler.version}</target> <excludes> <!-- Currently we need to exclude the TouchGraph support, since there is no Maven compatible binary distribution yet. --> <exclude>${jgrapht.touchgraph.filter}</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> <configuration> <testFailureIgnore>false</testFailureIgnore> </configuration> </plugin> </plugins> </build> </project> |
From: John S. <js...@gm...> - 2010-09-30 04:13:52
|
Hi Rob, A major point of distinction used to be that JGraphT's API was based on generics, whereas JUNG's was not. However, with the release of Jung 2.0, this is no longer the case as they have made the API quite similar to JGraphT. In general, JGraphT focuses more on the data structure toolkit aspect so that you can come up with an optimized representations (including automatic indexing via custom listeners), as well as create sophisticated views into existing graphs (e.g. induced subgraph). JUNG's algorithm library is probably quite a bit bigger than JGraphT's at this point, but I think there are some algorithms that only appear in one library or the other. JUNG has a lot more visualization support. If someone were interested in unifying the two libraries to get the best of both, I would be very supportive of that since I am a bit overloaded in terms of the number of open source projects I'm involved with these days (Apache Hive, LucidDB, Eigenbase, ...). If you get a better answer, you might ask the JUNG people to update this FAQ entry (and I could link it from the JGraphT website): http://jung.sourceforge.net/faq.html#different JVS On 9/29/10, Rob Patro <rob...@gm...> wrote: > Hi All, > > I was wondering if anyone might be able to provide me with a short > comparison between JGraphT and JUNG. > What are the primary differences between these two libraries? How do they > compare in terms of features and performance? > How do they compare in terms of API and ease-of-use? > > Thanks, > Rob > |