[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Thoughts on consistency in functions
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] Thoughts on consistency in functions |
Date: |
Fri, 30 Oct 2009 18:01:30 +0100 |
What would get.vertices do?
G.
On Fri, Oct 30, 2009 at 5:26 PM, Magnus Torfason <address@hidden> wrote:
> I just sent in the functions 'get.edges.as.data.frame()' and
> 'get.vertices.as.data.frame()'. While writing them I thought that there
> really should exist two functions, get.edges() and get.vertices() that
> return the information in the simplest structures possible (matrix for
> get.edges() and vector for get.vertices()). The functions could have the
> following definitions (with defaults chosen for backwards compatibility and
> consistency):
>
> get.edges <- (graph, es=E(graph), names=FALSE) {...}
>
> get.vertices <- (graph, vs=V(graph), names=FALSE) {...}
>
> Then, get.edgelist() could be deprecated and its definition could also be
> simplified:
>
> get.edgelist <- (graph, names=TRUE)
> {
> get.edges(graph, es=E(graph), names=names)
> }
>
> This is just a thought, I may be missing some detail about the difference
> between get.edges() and get.edgelist(), and there may be performance
> implications, but I thought I'd share it anyway.
>
> Best,
> Magnus
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
--
Gabor Csardi <address@hidden> UNIL DGM