any API for handling graph? in java - java

I would like to use the concept of MindMap
http://en.wikipedia.org/wiki/Mind_map
in a AI program. Is there any API for java? A good api for drawing and manipulating graphs with enough documentation and examples will also do the job.
I dont actually need to represent it graphically , i just need to build the map in any method(used for representing graphs, ) and search in it.
The program shall take a word as input
Search the mindmap for it and display the relevant words.

JGraphT was possible solution for me. I am working on it

Have you tried FreeMind? It's an open-source Java MindMap framework.

Related

Generating a tree visualization in java

I don't know what is the name of this visualization type, but I want to learn how to draw trees like the ones in this image:
I've seen this kind of visualization in many sites but I'm unable to know the technical term behind it.
That graph seems a lot like a force-directed layout. Painting those kind of images is not an easy task, depending on what are you trying to accomplish, you might want to use an existing framwork. If you want to use java you should see at gephi, if you can use an html approach you should definitely take a look at d3.js which is a javascript library for data visualization. They have neat examples: directed-force layout, and collapsible-force layout.
This particular image is done by Stephanie Posavec. You can learn about her design process from an interview she gave the folks at the Data Stories podcast. As far as I remember it, she partially crafts her visualizations by hand, so I'm not sure if you'll ever find an algorithm that does exactly this for you. For different tree layout algorithms, you can refer to treevis.net.

Java Graph Visualisation Library: Nodes with multiple connect points

Can anyone recommend a Java Graph Visualisation library in which graph nodes can be rendered with multiple connect points?
For example, supposing a graph node represents a processor that takes input from two sources and produces output. This would be visualised as 3 vertices. However, clearly each vertex has a defined role in the workflow and therefore ideally my node would appear with 3 distinct connection points that the user could attach vertices to.
I've taken a look at JUNG but I don't think it will suit my needs.
Any recommendations welcome; either on specific libraries or alternative approaches I can take.
You could try JGraph's java library
JGRAPH
It has a good amount of functionality and I have used it with success before. The only thing is that the documentation is a bit lacking, but if you read through some examples and code its pretty good when you get the hang of it.
Take a look at JGraph (http://www.jgraph.com/). I used jgraph-5.14.0.0 for a similar project before. Here are the graphs that I made for another project: https://github.com/eamocanu/spellcheck.graph/tree/master/graph%20photos

Java - generate class diagram by myself

I am working on a small project in Java described below:
Input: List of objects for directed graph. ( Nodes with different kind of edges: inheritance, inner-class, friend classes, etc. )
Output: class diagram, as planar as possible.
My problem is:
I would like to have some 3rd party software that will do it for me or at least have an algorithm of selecting nodes and edges to keep my graph as planar as possible.
EDIT:
I see I may not have written clearly what I want... I don't want to generate class diagram based on Java project with its files, but I am parsing C++ file and get from there list described in above input. Then I want to call some function on that list and get my diagram. I was trying to use JGraph or JGraphT but I unfortunately didn't find any graph-theory functionality which suit my requirements.
Regards,
Daniel
If you use Eclipse IDE you can use Soyatec's eUML2 free plugin. Have a look here.

How to create a user interface like Google maps (a draggable map)?

I have to draw a graph with many nodes, and I thought that an user interface like what Google maps offers could be nice to navigate the graph. I'm currently using Java for my application (a web application): what technologies/libraries should I use to build an interface like google maps? What approach?
edit: I'm interested mainly in creating a draggable map with zooming capabilities
edit2: I'm not looking for the exact solution of the problem, but for some starting point
If you have a massive data to display, one approach is to create an interactive interface that let the user to navigate in your data. Higher the zoom, greater the details.
An example of google maps like interface for other purpose is zoompy
Are you familiar with OpenLayers? It is JavaScript map visualization library. Combined with something like OpenStreetMap, you can get some very powerful visualization with data for free.
Take a look at the tools in Eclipse's Graphical Modeling Project.
Take a look at Polymaps, specifically the support for vector data via geoJSON. It's a Javascript library that handles doing all the slippy-map interface: zooming, scrolling, and loading new sections of the map via HTTP. It renders to SVG, so it looks great and works in every browser except pre-9.0 MSIE.
It's a bit odd to use a geographic tool to draw arbitrary graphs, but it's totally doable. The Mandlebrot example is a proof of concept.
I was successful using modestmaps for Processing (find it here). A processing PApplet can be embedded in a swing GUI as explained here. I guess you could use the source to draw your graph in processing and then use the already implemented 'slippy map' features.

Image Classification Algorithms Using Java

My goal is to implements different image classification methods to show how they function and the advantages and disadvantages behind such methods. The ones I want to try and implement using Java include;
Minimum distance classifier
k-nearest neighbour classifier.
I was wondering what can be used to accomplish my task that already exists in Java so that I can alter the way the algorithms operates.
Although not entirely sure this is what you are looking for (sorry, your question is a bit unclear), if what you want is a library / system to help you with the classification part of the work, then you may want to look at Weka (http://www.cs.waikato.ac.nz/ml/weka/), in my opinion the best Java library for data mining experimentation.
If, instead, you are looking for algorithms that would allow you to analyze images in order to extract features that can, in turn, be used to perform the classification, you may want to start with targeted descriptions of such algorithms in Java, such as those found in the nice on-line book Java Image Processing Cookbook by Rafael Santos; here's a direct link to the section "A Brief Tutorial on Supervised Image Classification".
You can also use RapidMiner with IMMI (IMage MIning) extension:
http://www.burgsys.com/mumi-image-mining-community.php
For image classification you can use for example global feature extraction and then use some classification algorithm (e.g. Artificial Neural Networks).

Categories

Resources