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 1B61CDE6E for ; Thu, 28 Jun 2012 08:25:48 +0000 (UTC) Received: (qmail 50371 invoked by uid 500); 28 Jun 2012 08:25:46 -0000 Delivered-To: apmail-giraph-dev-archive@giraph.apache.org Received: (qmail 50133 invoked by uid 500); 28 Jun 2012 08:25:46 -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 50086 invoked by uid 500); 28 Jun 2012 08:25:44 -0000 Delivered-To: apmail-incubator-giraph-dev@incubator.apache.org Received: (qmail 50076 invoked by uid 99); 28 Jun 2012 08:25: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 08:25:44 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id DA3D81418B6 for ; Thu, 28 Jun 2012 08:25:43 +0000 (UTC) Date: Thu, 28 Jun 2012 08:25:43 +0000 (UTC) From: "Avery Ching (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: <1026584348.65836.1340871943897.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=13402928#comment-13402928 ] Avery Ching commented on GIRAPH-221: ------------------------------------ We do have @Override public abstract Iterator iterator(); I can't remember the exact reason, but I think Jake Mannix had some reason for this... > 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 (int 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