Skip to content

Instantly share code, notes, and snippets.

View pigne's full-sized avatar

Yoann Pigné pigne

View GitHub Profile
import org.graphstream.graph.Graph;
import org.graphstream.graph.implementations.DefaultGraph;
import org.graphstream.ui.graphicGraph.stylesheet.StyleConstants;
import org.graphstream.ui.spriteManager.Sprite;
import org.graphstream.ui.spriteManager.SpriteManager;
public class FixedPositionBackgroundLogo {
public static void main(String[] args) throws InterruptedException {
System.setProperty("org.graphstream.ui", "swing");
@pigne
pigne / NodeFactories.java
Created October 29, 2020 17:23
Using factories in GraphStream
package fr.litislab;
import org.graphstream.graph.Graph;
import org.graphstream.graph.Node;
import org.graphstream.graph.NodeFactory;
import org.graphstream.graph.implementations.AbstractGraph;
import org.graphstream.graph.implementations.SingleGraph;
import org.graphstream.graph.implementations.SingleNode;
class Constants {

Keybase proof

I hereby claim:

  • I am pigne on github.
  • I am pigne (https://keybase.io/pigne) on keybase.
  • I have a public key ASCaiC4sIiJxEfZQz4mxtsUqIves3AnfYmDS6k_bQF10two

To claim this, I am signing this object:

@pigne
pigne / HyperEdges.java
Created March 28, 2017 06:32
Draw sprites around nodes sharing a same attribute and belonging to a same fully connected set. Mimics the visual representation of a hyper-graph.
import org.graphstream.algorithm.Toolkit;
import org.graphstream.graph.Graph;
import org.graphstream.graph.Node;
import org.graphstream.graph.implementations.MultiGraph;
import org.graphstream.stream.SinkAdapter;
import org.graphstream.ui.graphicGraph.stylesheet.StyleConstants;
import org.graphstream.ui.spriteManager.Sprite;
import org.graphstream.ui.spriteManager.SpriteManager;
import org.graphstream.ui.view.Viewer;
import org.graphstream.ui.view.ViewerPipe;
@pigne
pigne / Orientation.java
Created November 25, 2016 10:52
Illusion of a rotating image using several images and classes. GraphStream
/**
*
* Copyright (c) 2012 University of Le Havre
*
* @file T2.java
* @date Jul 3, 2012
*
* @author Yoann Pigné
*
*/
import org.graphstream.algorithm.generator.BaseGenerator;
import org.graphstream.algorithm.generator.LobsterGenerator;
import org.graphstream.graph.Edge;
import org.graphstream.graph.Graph;
import org.graphstream.graph.Node;
import org.graphstream.graph.implementations.SingleGraph;
import org.graphstream.stream.ProxyPipe;
import org.graphstream.stream.SinkAdapter;
import org.graphstream.ui.view.Viewer;
import org.graphstream.algorithm.generator.BarabasiAlbertGenerator;
import org.graphstream.algorithm.generator.Generator;
import org.graphstream.stream.Sink;
import org.graphstream.stream.SinkAdapter;
/**
* Created by pigne on 8/11/16.
*/
public class PrintEdgeEvents {
public static void main(String[] args) {
@pigne
pigne / DFSearch.java
Created December 17, 2015 15:20
Simple Depth First search with highlighted edges. GraphStream.
import org.graphstream.algorithm.generator.BarabasiAlbertGenerator;
import org.graphstream.graph.DepthFirstIterator;
import org.graphstream.graph.Edge;
import org.graphstream.graph.Graph;
import org.graphstream.graph.Node;
import org.graphstream.graph.implementations.SingleGraph;
/**
* Simple Depth First search with highlighted edges.
*