Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD5239B10 for ; Sun, 18 Dec 2011 19:58:56 +0000 (UTC) Received: (qmail 12490 invoked by uid 500); 18 Dec 2011 19:58:56 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 12432 invoked by uid 500); 18 Dec 2011 19:58:56 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 12423 invoked by uid 99); 18 Dec 2011 19:58:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Dec 2011 19:58:56 +0000 X-ASF-Spam-Status: No, hits=-2002.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Dec 2011 19:58:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 93D3C11A895 for ; Sun, 18 Dec 2011 19:58:31 +0000 (UTC) Date: Sun, 18 Dec 2011 19:58:31 +0000 (UTC) From: "Simone Tripodi (Resolved) (JIRA)" To: issues@commons.apache.org Message-ID: <854950842.24543.1324238311606.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <682120697.24494.1324232551306.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (SANDBOX-345) Weighted as an interface with generic weight type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SANDBOX-345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Tripodi resolved SANDBOX-345. ------------------------------------ Resolution: Fixed Assignee: Simone Tripodi Simply amazing Claudio, thanks for the hard work! I just applied your patch, see [r1220522|http://svn.apache.org/viewvc?view=revision&revision=1220522] I just have modified a part in the DotExporter to avoid multiple checks - the rest looks more than OK ;) Thanks for contributing! > Weighted as an interface with generic weight type > ------------------------------------------------- > > Key: SANDBOX-345 > URL: https://issues.apache.org/jira/browse/SANDBOX-345 > Project: Commons Sandbox > Issue Type: Improvement > Components: Graph > Reporter: Claudio Squarcella > Assignee: Simone Tripodi > Priority: Minor > Labels: graph, weight, weighted > Attachments: WeightedAsAnInterfaceWithGenericWeightType.patch > > > Hello, > after recent discussions on the mailing list ("[Graph] On graph weight type(s)") I am proposing a first patch to enable support for generic weights in the current implementation. > Main changes include: > - adding an interface Weighted with method W getWeight() > - modifying WeightedEdge, WeightedPath, WeightedGraph etc. to implement the new interface > - changing the implemented algorithms (at the moment they all still require weights to be Double) > - changing the DOT exporter (prints the weight as an attribute only if it is of type Double) > - incidentally also fixing a small bug in the DOT exporter ('weight' was part of the label, now it is a proper attribute as documented in DOT language specs http://www.graphviz.org/content/attrs#dweight) > This can be the first safe step to dig into different types and/or properties of weights. > Please let me know if it looks good. > Cheers, > Claudio -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira