[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15754051#comment-15754051
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/2984


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15753950#comment-15753950
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on the issue:

https://github.com/apache/flink/pull/2984
  
Thank you @mushketyk. That's OK. I'm merging this PR.


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15752618#comment-15752618
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user mushketyk commented on the issue:

https://github.com/apache/flink/pull/2984
  
Hi @vasia , thank you for your review!

I've added the warning to the Bipartite Graph page.
I am a bit reluctant to rename "Graph transformations" though since I 
wanted to extend this section in other commits when we have more operations for 
BipartiteGraph transformations, e.g. map.

What do you think about this?


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15751844#comment-15751844
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on the issue:

https://github.com/apache/flink/pull/2984
  
Hi @mushketyk, thank you for the update!
Just a couple of small things and we can merge:
- Can you add a note in the beginning of the docs that bipartite graphs are 
only currently supported in the Gelly Java API?
- I would rename the "Graph transformations" section to "Projection".


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15746285#comment-15746285
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user mushketyk commented on the issue:

https://github.com/apache/flink/pull/2984
  
Hi @vasia. Thank you for your comments. I've added the link to the doc and 
added the image (I tried to make it in the same style as other Gelly image).


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15744476#comment-15744476
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on the issue:

https://github.com/apache/flink/pull/2984
  
Thank you for the update @mushketyk! I still don't see any link from the 
Gelly guide page to the bipartite docs though. Can you please add that too? 
Otherwise people won't be able to find the docs :)
As for the images, I think it would be nice to have show how a projection 
works.


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15742590#comment-15742590
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user mushketyk commented on the issue:

https://github.com/apache/flink/pull/2984
  
Hi @vasia,

Thank you for your review. I've updated the documentation accordingly and 
added more detailed descriptions for projections code examples. Do you think it 
is still better to add some images?


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15742515#comment-15742515
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user mushketyk commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91995428
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
--- End diff --

Oops, right :)


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741436#comment-15741436
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908875
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
+
+
+
+{% highlight java %}
+BipartiteEdge e = new BipartiteEdge(1L, "id1", 0.5);
+
+Double weight = e.getValue(); // weight = 0.5
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+{% top %}
+
+
+Graph Creation
+--
+
+You can create a `BipartiteGraph` in the following ways:
+
+* from a `DataSet` of top vertices, a `DataSet` of bottom vertices and a 
`DataSet` of edges:
+
+
+
+{% highlight java %}
+ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
+
+DataSet> topVertices = ...
+
+DataSet> bottomVertices = ...
+
+DataSet> edges = ...
+
+Graph graph = 
BipartiteGraph.fromDataSet(topVertices, bottomVertices, edges, env);
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+
+
+Graph Transformations
+-
+
+
+* Projection: Projection is a common operation for 
bipartite graphs that converts a bipartite graph into a regular graph. There 
are two types of projections: top and bottom projections. Top projection 
preserves only top nodes in the result graph and create a link between them in 
a new graph only if there is an intermediate bottom node both top nodes connect 
to in the original graph. Bottom projection is the opposite to top projection, 
i.e. only preserves bottom nodes and connects a pair of node if they are 
connected in the original graph.
+
+Gelly supports two sub-types of projections: simple projections and full 
projections. The only difference between them is what data is associated with 
edges in the result graph.
+
+In case of a simple projection each node in the result graph 

[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741447#comment-15741447
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91909237
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
+
+
+
+{% highlight java %}
+BipartiteEdge e = new BipartiteEdge(1L, "id1", 0.5);
+
+Double weight = e.getValue(); // weight = 0.5
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+{% top %}
+
+
+Graph Creation
+--
+
+You can create a `BipartiteGraph` in the following ways:
+
+* from a `DataSet` of top vertices, a `DataSet` of bottom vertices and a 
`DataSet` of edges:
+
+
+
+{% highlight java %}
+ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
+
+DataSet> topVertices = ...
+
+DataSet> bottomVertices = ...
+
+DataSet> edges = ...
+
+Graph graph = 
BipartiteGraph.fromDataSet(topVertices, bottomVertices, edges, env);
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+
+
+Graph Transformations
+-
+
+
+* Projection: Projection is a common operation for 
bipartite graphs that converts a bipartite graph into a regular graph. There 
are two types of projections: top and bottom projections. Top projection 
preserves only top nodes in the result graph and create a link between them in 
a new graph only if there is an intermediate bottom node both top nodes connect 
to in the original graph. Bottom projection is the opposite to top projection, 
i.e. only preserves bottom nodes and connects a pair of node if they are 
connected in the original graph.
+
+Gelly supports two sub-types of projections: simple projections and full 
projections. The only difference between them is what data is associated with 
edges in the result graph.
+
+In case of a simple projection each node in the result graph 

[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741434#comment-15741434
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91907816
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
--- End diff --

A single edge => an edge
cannot connect to vertices => cannot connect *two vertices


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741437#comment-15741437
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908589
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
+
+
+
+{% highlight java %}
+BipartiteEdge e = new BipartiteEdge(1L, "id1", 0.5);
+
+Double weight = e.getValue(); // weight = 0.5
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+{% top %}
+
+
+Graph Creation
+--
+
+You can create a `BipartiteGraph` in the following ways:
+
+* from a `DataSet` of top vertices, a `DataSet` of bottom vertices and a 
`DataSet` of edges:
+
+
+
+{% highlight java %}
+ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
+
+DataSet> topVertices = ...
+
+DataSet> bottomVertices = ...
+
+DataSet> edges = ...
+
+Graph graph = 
BipartiteGraph.fromDataSet(topVertices, bottomVertices, edges, env);
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
--- End diff --

same as above


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741441#comment-15741441
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908218
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
--- End diff --

*apply


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741435#comment-15741435
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91907924
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
--- End diff --

 a node between a top and a bottom nodes => an edge?


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741448#comment-15741448
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908249
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
--- End diff --

*A BipartiteEdge


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741446#comment-15741446
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908101
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
--- End diff --

*graphs


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741445#comment-15741445
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908511
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
+
+
+
+{% highlight java %}
+BipartiteEdge e = new BipartiteEdge(1L, "id1", 0.5);
+
+Double weight = e.getValue(); // weight = 0.5
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
--- End diff --

Don't leave a TODO in the docs. Either state explicitly that BipartiteGraph 
currently only exists in the Java API or we should make sure to implement the 
Scala methods before merging this.


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741444#comment-15741444
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908677
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
+
+
+
+{% highlight java %}
+BipartiteEdge e = new BipartiteEdge(1L, "id1", 0.5);
+
+Double weight = e.getValue(); // weight = 0.5
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+{% top %}
+
+
+Graph Creation
+--
+
+You can create a `BipartiteGraph` in the following ways:
+
+* from a `DataSet` of top vertices, a `DataSet` of bottom vertices and a 
`DataSet` of edges:
+
+
+
+{% highlight java %}
+ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
+
+DataSet> topVertices = ...
+
+DataSet> bottomVertices = ...
+
+DataSet> edges = ...
+
+Graph graph = 
BipartiteGraph.fromDataSet(topVertices, bottomVertices, edges, env);
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+
+
+Graph Transformations
+-
+
+
+* Projection: Projection is a common operation for 
bipartite graphs that converts a bipartite graph into a regular graph. There 
are two types of projections: top and bottom projections. Top projection 
preserves only top nodes in the result graph and create a link between them in 
a new graph only if there is an intermediate bottom node both top nodes connect 
to in the original graph. Bottom projection is the opposite to top projection, 
i.e. only preserves bottom nodes and connects a pair of node if they are 
connected in the original graph.
--- End diff --

*nodes


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>   

[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741438#comment-15741438
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908769
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
+
+
+
+{% highlight java %}
+BipartiteEdge e = new BipartiteEdge(1L, "id1", 0.5);
+
+Double weight = e.getValue(); // weight = 0.5
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+{% top %}
+
+
+Graph Creation
+--
+
+You can create a `BipartiteGraph` in the following ways:
+
+* from a `DataSet` of top vertices, a `DataSet` of bottom vertices and a 
`DataSet` of edges:
+
+
+
+{% highlight java %}
+ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
+
+DataSet> topVertices = ...
+
+DataSet> bottomVertices = ...
+
+DataSet> edges = ...
+
+Graph graph = 
BipartiteGraph.fromDataSet(topVertices, bottomVertices, edges, env);
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+
+
+Graph Transformations
+-
+
+
+* Projection: Projection is a common operation for 
bipartite graphs that converts a bipartite graph into a regular graph. There 
are two types of projections: top and bottom projections. Top projection 
preserves only top nodes in the result graph and create a link between them in 
a new graph only if there is an intermediate bottom node both top nodes connect 
to in the original graph. Bottom projection is the opposite to top projection, 
i.e. only preserves bottom nodes and connects a pair of node if they are 
connected in the original graph.
--- End diff --

Can you add a figure to illustrate a top and a bottom projection?


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: 

[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741439#comment-15741439
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91907989
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
--- End diff --

a relationships => relationships


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741443#comment-15741443
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908174
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
--- End diff --

*a DataSet...


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741440#comment-15741440
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908032
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
--- End diff --

*graphs


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741449#comment-15741449
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908641
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
+ * Bipartite graph can encode the same information more compactly than 
one-mode graphs
+ 
+
+
+Graph Representation
+
+
+A `BipartiteGraph` is represented by:
+ * `DataSet` of top nodes
+ * `DataSet` of bottom nodes
+ * `DataSet` of edges between top and bottom nodes
+
+As in the `Graph` class nodes are represented by the `Vertex` type and the 
same rules applies to its types and values.
+
+The graph edges are represented by the `BipartiteEdge` type. An 
`BipartiteEdge` is defined by a top ID (the ID of the top `Vertex`), a bottom 
ID (the ID of the bottom `Vertex`) and an optional value. The main difference 
between the `Edge` and `BipartiteEdge` is that IDs of nodes it links can be of 
different types. Edges with no value have a `NullValue` value type.
+
+
+
+{% highlight java %}
+BipartiteEdge e = new BipartiteEdge(1L, "id1", 0.5);
+
+Double weight = e.getValue(); // weight = 0.5
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+{% top %}
+
+
+Graph Creation
+--
+
+You can create a `BipartiteGraph` in the following ways:
+
+* from a `DataSet` of top vertices, a `DataSet` of bottom vertices and a 
`DataSet` of edges:
+
+
+
+{% highlight java %}
+ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
+
+DataSet> topVertices = ...
+
+DataSet> bottomVertices = ...
+
+DataSet> edges = ...
+
+Graph graph = 
BipartiteGraph.fromDataSet(topVertices, bottomVertices, edges, env);
+{% endhighlight %}
+
+
+
+{% highlight scala %}
+// TODO: Should be added when Scala interface is implemented
+{% endhighlight %}
+
+
+
+
+Graph Transformations
+-
+
+
+* Projection: Projection is a common operation for 
bipartite graphs that converts a bipartite graph into a regular graph. There 
are two types of projections: top and bottom projections. Top projection 
preserves only top nodes in the result graph and create a link between them in 
a new graph only if there is an intermediate bottom node both top nodes connect 
to in the original graph. Bottom projection is the opposite to top projection, 
i.e. only preserves bottom nodes and connects a pair of node if they are 
connected in the original graph.
--- End diff --

*creates


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
> 

[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741442#comment-15741442
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91908073
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
+nav-parent_id: graphs
+nav-pos: 6
+---
+
+
+* This will be replaced by the TOC
+{:toc}
+
+Bipartite Graph
+---
+
+A bipartite graph (also called a two-mode graph) is a type of graph where 
vertices are separated into two disjoint sets. These sets are usually called 
top and bottom vertices. A single edge in this graph can only connect vertices 
from opposite sets (i.e. bottom vertex to top vertex) and cannot connect to 
vertices in the same set.
+
+Theses graphs have wide application in practice and can be a more natural 
choice for particular domains. For example to represent authorship of 
scientific papers top vertices can represent scientific papers while bottom 
nodes will represent authors. Naturally a node between a top and a bottom nodes 
would represent an authorship of a particular scientific paper. Another common 
example for applications of bipartite graphs is a relationships between actors 
and movies. In this case an edge represents that a particular actor played in a 
movie.
+
+Bipartite graph are used instead of regular graphs (one-mode) for the 
following practical 
[reasons](http://www.complexnetworks.fr/wp-content/uploads/2011/01/socnet07.pdf):
+ * They preserve more information about a connection between vertices. For 
example instead of a single link between two researchers in a graph that 
represents that they authored a paper together a bipartite graph preserve the 
information about what papers they authored
--- End diff --

*preserves


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741408#comment-15741408
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

Github user vasia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2984#discussion_r91907660
  
--- Diff: docs/dev/libs/gelly/bipartite_graph.md ---
@@ -0,0 +1,148 @@
+---
+title: Graph Generators
--- End diff --

This shouldn't be Graph Generators I believe :)


> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-5311) Write user documentation for BipartiteGraph

2016-12-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15738210#comment-15738210
 ] 

ASF GitHub Bot commented on FLINK-5311:
---

GitHub user mushketyk opened a pull request:

https://github.com/apache/flink/pull/2984

[FLINK-5311] Add user documentation for bipartite graph

Thanks for contributing to Apache Flink. Before you open your pull request, 
please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your 
pull request. For more information and/or questions please refer to the [How To 
Contribute guide](http://flink.apache.org/how-to-contribute.html).
In addition to going through the list, please provide a meaningful 
description of your changes.

- [x] General
  - The pull request references the related JIRA issue ("[FLINK-XXX] Jira 
title text")
  - The pull request addresses only one issue
  - Each commit in the PR has a meaningful commit message (including the 
JIRA id)

- [x] Documentation
  - Documentation has been added for new functionality
  - Old documentation affected by the pull request has been updated
  - JavaDoc for public methods has been added

- [x] Tests & Build
  - Functionality added by the pull request is covered by tests
  - `mvn clean verify` has been executed successfully locally or a Travis 
build has passed



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mushketyk/flink bipartite-docs

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/2984.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2984


commit 9c49eed7960ec1a7a853b32b742bd36615ba5fc0
Author: Ivan Mushketyk 
Date:   2016-12-10T17:41:30Z

[FLINK-5311] Add user documentation for bipartite graph




> Write user documentation for BipartiteGraph
> ---
>
> Key: FLINK-5311
> URL: https://issues.apache.org/jira/browse/FLINK-5311
> Project: Flink
>  Issue Type: Bug
>  Components: Gelly
>Reporter: Ivan Mushketyk
>Assignee: Ivan Mushketyk
>
> We need to add user documentation. The progress on BipartiteGraph can be 
> tracked in the following JIRA:
> https://issues.apache.org/jira/browse/FLINK-2254



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)