alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (GraphVectors.java)

This example Java source code file (GraphVectors.java) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

graphvectors, igraph, indarray, serializable, util, vertex

The GraphVectors.java Java example source code

package org.deeplearning4j.graph.models;

import org.deeplearning4j.graph.api.IGraph;
import org.deeplearning4j.graph.api.Vertex;
import org.nd4j.linalg.api.ndarray.INDArray;

import java.io.Serializable;
import java.util.Collection;

/**Vectors for nodes in a graph.
 * Provides lookup table and convenience methods for graph vectors
 */
public interface GraphVectors<V,E> extends Serializable {

    public IGraph<V,E> getGraph();

    public int numVertices();

    public int getVectorSize();

    public INDArray getVertexVector(Vertex<V> vertex);

    public INDArray getVertexVector(int vertexIdx);

    public int[] verticesNearest(int vertexIdx, int top);

    double similarity(Vertex<V> vertex1, Vertex vertex2);

    double similarity(int vertexIdx1, int vertexIdx2);

}

Other Java examples (source code examples)

Here is a short list of links related to this Java GraphVectors.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.