src/main/java/org/thegalactic/dgraph/DAGraph.java
public static DAGraph<Integer, ?> divisors(int number) {
        DAGraph<Integer, ?> graph = new DAGraph<Integer, Object>();
        // addition of nodes
        for (int i = 2; i <= number; i++) {
            graph.addNode(new Node<Integer>(Integer.valueOf(i)));
        }
        // addition of edges
        for (Node<Integer> source : graph.getNodes()) {
            for (Node<Integer> target : graph.getNodes()) {
                int v1 = ((Integer) source.getContent()).intValue();
                int v2 = ((Integer) target.getContent()).intValue();
                if (v1 < v2 && v2 % v1 == 0) {
                    graph.addEdge(source, target);
                }
            }
        }
        return graph;
    }
/**
     * Generates the directed asyclic graph (DAG) of divisors for integers
     * included betwwen 2 and the specified value.
     *
     * In this DAG, nodes corresponds to the integers, and there is an edge
     * between two integers if and only if the second one is divisible by the
     * first one.
     *
     * @param number the maximal integer
     *
     * @return the acyclic graph
     */
Generates the directed asyclic graph (DAG) of divisors for integers
included betwwen 2 and the specified value.

In this DAG, nodes corresponds to the integers, and there is an edge
between two integers if and only if the second one is divisible by the
first one.

@param number the maximal integer

@return the acyclic graph
Generates the directed asyclic graph ( DAG ) of divisors for integers included betwwen 2 and the specified value . In this DAG nodes corresponds to the integers and there is an edge between two integers if and only if the second one is divisible by the first one . @param number the maximal integer @return the acyclic graph
public static DAGraph<Integer, ?> divisors(int number) {
        DAGraph<Integer, ?> graph = new DAGraph<Integer, Object>();
        for (int i = 2; i <= number; i++) {
            graph.addNode(new Node<Integer>(Integer.valueOf(i)));
        }
        for (Node<Integer> source : graph.getNodes()) {
            for (Node<Integer> target : graph.getNodes()) {
                int v1 = ((Integer) source.getContent()).intValue();
                int v2 = ((Integer) target.getContent()).intValue();
                if (v1 < v2 && v2 % v1 == 0) {
                    graph.addEdge(source, target);
                }
            }
        }
        return graph;
    }
public static DAGraph < Integer , ? > divisors ( int number ) { DAGraph < Integer , ? > graph = new DAGraph < Integer , Object > ( ) ; for ( int i = 2 ; i <= number ; i ++ ) { graph . addNode ( new Node < Integer > ( Integer . valueOf ( i ) ) ) ; } for ( Node < Integer > source : graph . getNodes ( ) ) { for ( Node < Integer > target : graph . getNodes ( ) ) { int v1 = ( ( Integer ) source . getContent ( ) ) . intValue ( ) ; int v2 = ( ( Integer ) target . getContent ( ) ) . intValue ( ) ; if ( v1 < v2 && v2 % v1 == 0 ) { graph . addEdge ( source , target ) ; } } } return graph ; }
Generates the directed asyclic graph (DAG) of divisors for integers
 included betwwen 2 and the specified value.
Generates the directed asyclic graph ( DAG ) of divisors for integers included betwwen 2 and the specified value .
// addition of nodes // addition of edges