Return-Path: X-Original-To: apmail-giraph-dev-archive@www.apache.org Delivered-To: apmail-giraph-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF219D974 for ; Thu, 28 Jun 2012 16:58:44 +0000 (UTC) Received: (qmail 49699 invoked by uid 500); 28 Jun 2012 16:58:44 -0000 Delivered-To: apmail-giraph-dev-archive@giraph.apache.org Received: (qmail 49668 invoked by uid 500); 28 Jun 2012 16:58:44 -0000 Mailing-List: contact dev-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@giraph.apache.org Delivered-To: mailing list dev@giraph.apache.org Received: (qmail 49660 invoked by uid 500); 28 Jun 2012 16:58:44 -0000 Delivered-To: apmail-incubator-giraph-dev@incubator.apache.org Received: (qmail 49657 invoked by uid 99); 28 Jun 2012 16:58:44 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2012 16:58:44 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 1FE9B141E10 for ; Thu, 28 Jun 2012 16:58:44 +0000 (UTC) Date: Thu, 28 Jun 2012 16:58:44 +0000 (UTC) From: "Jan van der Lugt (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: <613356910.67269.1340902724132.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1830266715.62551.1340815844017.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (GIRAPH-221) Make iteration over edges more explicit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GIRAPH-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13403215#comment-13403215 ] Jan van der Lugt commented on GIRAPH-221: ----------------------------------------- +1 for adding an explicit OutEdgeIterator. The current syntax 'for (LongWritable neighbor : this)' is not really intuitive for people seeing code like this for the first time. > Make iteration over edges more explicit > --------------------------------------- > > Key: GIRAPH-221 > URL: https://issues.apache.org/jira/browse/GIRAPH-221 > Project: Giraph > Issue Type: Improvement > Components: graph > Reporter: Alessandro Presta > Assignee: Alessandro Presta > Priority: Minor > > Is there any particular reason why BasicVertex implements Iterable? > It seems to me that doing > {code:java} > for (I neighbor : vertex) > {code} > is not that explicit, and > {code:java} > for (I neighbor : this) > {code} > gets even obscure (which may be why all examples in the codebase explicitly instantiate an iterator and call next()). > What I propose is a more explicit > {code:java} > Iterator outEdgesIterator() > {code} > and also a convenient > {code:java} > Iterable outEdges() > {code} > so, for example, an algorithm can use > {code:java} > for (IntWritable neighbor : outEdges()) > {code} -- 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