text stringlengths 3 1.18M |
|---|
Class MyarrayList{
Private int[]MyArray;
Private int size;
Public MyArrayList(int value,int seed,int inc)
MyArray= new int[value];
size = value;
for (int i =0; i<size;i++){
MyArray[i]=seed;
seed+= inc;
}
} |
public class HelloWorld {
public static void main(String[] orgs) {
int x;
}
}
|
import javax.swing.*;
public class UserInput {
public static void main(String[] args) {
String num = "";
//String paul="";
//String sum="";
num = JOptionPane. showInputDialog(null, "Please enter your name:");
JOptionPane.showMessageDialog(null,"Hello " +num);
/*if(num == null){
JOpti... |
import javax.swing.JOptionPane;
public class CALACULATOR {
public static void main(String[] args) {
String num1 = "";
String num2 = "";
num1 = JOptionPane.showInputDialog
(null, "ENTER FIRST NUMBER:");
num2 = JOptionPane.showInputDialog
(null, "ENTER SECOND NUMEBR:");
double a1... |
import javax.swing.*;
public class OddOrEven {
public static void main(String[] args){
int b;
String c;
c = JOptionPane.showInputDialog(null, "ENTER NUMBER:");
b = Integer.parseInt(c);
if(b % 2 == 0){
JOptionPane.showMessageDialog(null, "The Number is Even!");
}
else{
JOptionPa... |
import javax.swing.JOptionPane;
public class ODDorEVEN {
public static void main(String[] args){
String str = JOptionPane.showInputDialog(null, "ENTER NUMBER:");
double num = Double.parseDouble(str);
//or int num = Integer.parseInt(str... |
class MyArrayList{
private int[] MyArray;
private int size;
public MyArrayList(int value, int seed, int inc){ //constructor
MyArray = new int [value];
size = value;
for (int i = 0; i < size; i++) {
MyArray[i] = seed;
seed += inc;
}
}
public void PrintElement(){
for (int i = 0;... |
class MyArrayList{
private int[]MyArray;
private int size;
public MyArrayList(int value, int seed, int inc){
MyArray= new int [value];
size = value;
for(int i = 0; 1 < size; i++){
MyArray[i] = seed;
seed += inc;
}
}
public void PrintElement(){
for (int i = 0; i < size; i++... |
class MyArrayList{
private int[]MyArray;
private int size;
public MyArrayList(int value, int seed, int inc){
MyArray= new int [value];
size = value;
for(int i = 0; 1 < size; i++){
MyArray[i] = seed;
seed += inc;
}
}
public void PrintElement(){
for (int i = 0; i < size; i++... |
class LinkedListNode {
public int data;
public LinkedListNode link;
}
public class JavaApplication1 {
public static void main(String[] args) {
/* exercise
head -> 45 -> 65 -> 50 -> 34 -> 76
exercise 1: insert 15 between 34 and 76
output: head -> ... |
class LinkedListNode{
public int data;
public LinkedListNode link;
}
public class JavaApplication2 {
public static void main(String[] args){
JavaApplication2 myVar = new JavaApplication2();
myVar.insertNode(41);
myVar.insertNode(11);
myVar.displayList();
myVar.insertNode(12);
myVar.i... |
class Node{
public int info;
public Node link;
}
class LinkList{
public Node head;
public int counter;
public LinkList(){
head = new Node();
counter = 0;
}
public void add(int _info){
Node newNode = new Node();
newNode.info = _info;
... |
import java.util.Random;
class SortArray {
private int[] MyArray;
public SortArray(){
System.out.println("Default Order: ");
Random digit = new Random();
MyArray = new int [10];
for (int counter = 0; counter < 10; counter++){
MyArray[counter] = 1 + digit.nextInt(10);
}
printElements();
}
publi... |
public class NewClass{
public static void main(String[] args) throws IOException{
try{
int n;
BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));
n = Integer.parseInt(in.readLine());
if (n % 2 == 0)
{
System.out.println("Given number is Even.");
}
else
{
System.out.println("Given num... |
package javaapplication1;
class Calculator{
int x;
int y;
int z;
public Calculator(int num1, int num2){
x = num1;
y = num2;
}
public int addNumers(){
return x+y;
return z;
}
public int subtractNumbers(){
z = x-y;
return z;
... |
package aimax.osm.gps;
import aimax.osm.data.Position;
/**
* Maintains measurement quality and position informations.
* @author Ruediger Lunde
*/
public class GpsFix extends Position {
private boolean posOk;
public GpsFix(boolean posOK, float lat, float lon) {
super(lat, lon);
this.posOk = pos... |
package aimax.osm.gps;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Maintains a connection to a GPS via a NMEA stream, decodes the
* position messages and publishes the obtained position informations.
* <p>To run this class, download the rs232 serial port library from
* ... |
package aimax.osm.gps;
/**
* Interface which allows locators to inform interested listeners about
* new gps fixes.
* @author Ruediger Lunde
*/
public interface GpsPositionListener {
void positionUpdated(GpsFix pos);
}
|
/**
* This package contains components for accessing GPS systems
* using a serial port connection and the NMEA protocol. It relies
* on the RXTX serial port library. To use the functionality, it is
* therefore necessary, to download the rs232 serial port library
* from http://www.rxtx.org/ and to install it c... |
package aimax.osm.gps;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.List;
/**
* Abstract class which provides general functionality for reading messages
* from... |
package aimax.osm.gps;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
/**
* Reads NMEA data from file.
* @author Ruediger Lunde
*
*/
public class NmeaFileReader extends NmeaReader {
private File file;
private long delay = 0; //1000l;
public NmeaFileRea... |
package aimax.osm.gps;
import java.io.File;
/**
* Singleton, which creates NMEA reader instances and hides their
* implementation. Reflection is used, to avoid compilation errors even
* if the needed serial port reader class does not exist.
* @author Ruediger Lunde
*/
public class NmeaReaderFactory {
... |
package aimax.osm.data;
import aimax.osm.data.entities.MapWay;
/**
* Decides, whether a map way is accepted or not by checking its id.
* @author Ruediger Lunde
*/
public interface MapWayFilter {
public boolean isAccepted(MapWay way);
}
|
package aimax.osm.data;
import java.util.HashSet;
import aimax.osm.data.entities.MapWay;
/**
* Way filter, which is based on attribute value checking.
* @author Ruediger Lunde
*/
public class MapWayAttFilter implements MapWayFilter {
String attName;
HashSet<String> attValues;
public MapWayAttFi... |
package aimax.osm.data;
import java.util.List;
import aimax.osm.data.entities.EntityAttribute;
import aimax.osm.data.entities.EntityViewInfo;
/**
* This map builder proxy delegates every call to the original builder.
*
* @author Ruediger Lunde
*/
public class MapBuilderProxy implements MapBuilder {
... |
package aimax.osm.data;
import java.util.Collection;
import java.util.List;
import aimax.osm.data.entities.MapEntity;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
import aimax.osm.data.entities.WayRef;
/**
* Maintains a latitude longitude pair and provides some useful me... |
package aimax.osm.data;
import java.io.InputStream;
/**
* Provides a stream with OSM map data describing the city of Ulm.
* @author Ruediger Lunde
*/
public class DataResource {
public static InputStream getULMFileResource() {
return DataResource.class.getResourceAsStream("ulm.osm");
}
}
|
/**
* This package together with its sub-packages contains the application layer
* classes of the OSM viewer.
* The most important interface is <code>OsmMap</code>. It defines a
* container for all map information and serves as model for the viewer. The
* provided operations focus on read access. To create an... |
package aimax.osm.data;
/**
* Provides map data change information to interested listeners.
* @author Ruediger Lunde
*/
public class MapEvent {
OsmMap source;
Type type;
long objId;
public MapEvent(OsmMap source, Type type) {
this.source = source;
this.type = type;
objId = -1;
}
pub... |
package aimax.osm.data;
import java.util.List;
import aimax.osm.data.entities.MapEntity;
/**
* Interface for search engines which find entities by name or by
* attribute. Search functionality is focused on analysis of the
* vicinity of a reference position.
* @author Ruediger Lunde
*/
public interfa... |
package aimax.osm.data;
import java.util.HashSet;
import java.util.Hashtable;
import aimax.osm.data.entities.EntityAttribute;
/**
* Singleton, maintaining entity attributes. This manager maintains
* a hash table for attribute key and value strings, a second for
* attributes consisting of two such string... |
package aimax.osm.data;
import java.util.ArrayList;
import java.util.List;
import aimax.osm.data.entities.MapEntity;
/**
* Classifies map entities with respect to their attributes based
* on declarative classification rules. A classifier consists of a
* default classification result and a sequence of cl... |
package aimax.osm.data;
import java.util.Collection;
import java.util.List;
import aimax.osm.data.entities.EntityViewInfo;
import aimax.osm.data.entities.MapEntity;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
import aimax.osm.data.entities.Track;
/**
* Central containe... |
package aimax.osm.data;
import java.util.List;
import aimax.osm.data.entities.EntityAttribute;
import aimax.osm.data.entities.EntityViewInfo;
/**
* Simple interface to aggregate map data. Its purpose is, to keep OSM parsers
* independent from the concrete structure which is used to store the data. Osm
*... |
package aimax.osm.data.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.EntityVisitor;
import aimax.osm.data.entities.MapEntity;
/**
* Implementation of a kd-tree (node) for map ... |
package aimax.osm.data.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import aimax.osm.data.EntityVisitor;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
import aimax.osm.data.entities.WayRef;
/**
* Default implementation of a node.... |
package aimax.osm.data.impl;
import java.util.List;
import java.util.StringTokenizer;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.OsmMap;
import aimax.osm.data.Position;
import aimax.osm.data.entities.EntityAttribute;
import aimax.osm.data.entities.MapEntity;
import aimax.osm.data.entities.MapN... |
/**
* This package contains implementations for all needed domain objects
* and containers. The {@link aimax.osm.data.impl.DefaultMap} class
* keeps the complete map in the RAM. So the maximum map size is limited by the
* available memory size.
*/
package aimax.osm.data.impl; |
package aimax.osm.data.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.EntityClassifier;
import aimax.osm.data.MapBuilder;
import aimax.osm.data.OsmMap;
import aimax.osm.data.entities.EntityAttribute;
import ... |
package aimax.osm.data.impl;
import java.util.Arrays;
import java.util.List;
import aimax.osm.data.EntityVisitor;
import aimax.osm.data.entities.EntityAttribute;
import aimax.osm.data.entities.EntityViewInfo;
import aimax.osm.data.entities.MapEntity;
/**
* Base class for all map entities in this default ... |
package aimax.osm.data.impl;
import java.util.ArrayList;
import java.util.List;
import aimax.osm.data.EntityVisitor;
import aimax.osm.data.Position;
import aimax.osm.data.entities.EntityAttribute;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.Track;
/**
* Represents a track. Thi... |
package aimax.osm.data.impl;
import java.util.Collections;
import java.util.List;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.EntityVisitor;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
/**
* Default implementation of a node.
* @author Ruediger Lunde
*/
... |
package aimax.osm.data.impl;
import aimax.osm.data.entities.MapWay;
import aimax.osm.data.entities.WayRef;
/**
* Represents a reference to a way. The node index indicates,
* where the node maintaining the reference occurs in the way definition.
* @author Ruediger Lunde
*/
public class DefaultWayRef impl... |
package aimax.osm.data.impl;
import java.util.ArrayList;
import java.util.List;
import aimax.osm.data.EntityFinder;
import aimax.osm.data.OsmMap;
import aimax.osm.data.MapWayFilter;
import aimax.osm.data.Position;
import aimax.osm.data.entities.MapEntity;
/**
* Base class suitable to implement different... |
package aimax.osm.data.impl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
import java.util.logging.Logger;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.EntityAttributeManager;
import aimax.osm.data.Enti... |
package aimax.osm.data;
import java.util.Collection;
import aimax.osm.data.entities.MapNode;
/**
* Simple representation of a bounding box for geo coordinates.
*
* @author Ruediger Lunde
*/
public class BoundingBox {
private float latMin;
private float lonMin;
private float latMax;
private fl... |
package aimax.osm.data;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
import aimax.osm.data.entities.Track;
/**
* The visitor pattern is used here, to iterate across sets
* of different kinds of map entities in a flexible manner.
* This interface supports for example the imp... |
package aimax.osm.data.entities;
import java.util.List;
import aimax.osm.data.BoundingBox;
/**
* Represents a way within a map. Ways are defined by lists of nodes.
* A special dynamic attribute called "oneway" marks ways, which can only
* be traveled in ascending node index order.
*
* @author Ruedig... |
package aimax.osm.data.entities;
import java.util.List;
import aimax.osm.data.Position;
/**
* Represents a track. A track is not really part of a map, but essential
* for displaying route planning results and agent movements. Therefore,
* it has been added here.
* @author Ruediger Lunde
*/
public in... |
package aimax.osm.data.entities;
import java.util.List;
/**
* Represents a node within the map. Nodes
* can be part of a way, points of interest, or marks.
* A full java bean interface is provided. So it is
* easy, to serialize objects using <code>XMLEncoder</code>.
* @author Ruediger Lunde
*/
public... |
package aimax.osm.data.entities;
/**
* Represents a reference to a way. The node index indicates,
* where the node maintaining the reference occurs in the way definition.
*
* @author Ruediger Lunde
*/
public interface WayRef {
/** Returns the referenced way. */
public MapWay getWay();
/** Returns a... |
package aimax.osm.data.entities;
import java.util.List;
import aimax.osm.data.EntityVisitor;
/**
* Common interface for all map entities. Map entities have id, name, and
* attributes, must accept a visitor (e.g. for rendering). The attached
* view information tells the map data storage for which scales t... |
/**
* This package defines the domain objects. The interfaces of nodes and
* ways are chosen very close to the corresponding objects within the Open
* Street Map data format. Only minor administrative attributes are ignored.
* Relations are currently not supported.
*
* @author Ruediger Lunde
*/
package ... |
package aimax.osm.data.entities;
/**
* An entity attribute consists of a key and a value string.
* @author Ruediger Lunde
*/
public class EntityAttribute implements Comparable<EntityAttribute> {
private String key;
private String value;
public EntityAttribute(String key, String value) {
this.key =... |
package aimax.osm.data.entities;
/**
* Entity view informations are attached to map entities and describe
* how the entity shall be drawn. This interface hides presentation layer
* aspects from the application layer. For data organization on application
* layer, only the minimal visible scale is relevant.
... |
package aimax.osm.data;
/**
* Allows to listen to map changes.
* @author Ruediger Lunde
*/
public interface MapEventListener {
void eventHappened(MapEvent event);
}
|
package aimax.osm.data;
import java.util.List;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
/**
* Provides different abstractions of a way for rendering.
* @author Ruediger Lunde
*/
public interface WayNodeProvider {
/**
* Returns a list of nodes describing the sp... |
package aimax.osm.writer;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.util.Collection;
import java.util.... |
package aimax.osm.writer;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
... |
package aimax.osm.writer;
import java.io.File;
import java.io.OutputStreamWriter;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.OsmMap;
/**
* Common interface for writing maps to file.
*
* @author Ruediger Lunde
*/
public interface MapWriter {
/** Writes a map to file. */
public void... |
package aimax.osm.applications;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Locale;
import javax.swing.JButton;
import javax.swing.JToggleButton;
import javax.swing.JToolBar;
import aimax.osm.data.DataResource;
import aimax.osm.data.Ent... |
package aimax.osm.applications;
import java.util.Locale;
import aima.gui.applications.AimaDemoApp;
import aima.gui.applications.AimaDemoFrame;
/**
* The all-in-one demo application including all apps and
* demos from the aima-gui project and some of the apps from
* the aimax-osm project.
*
* @autho... |
package aimax.osm.applications;
import java.util.Locale;
import aimax.osm.data.DataResource;
import aimax.osm.viewer.MapViewFrame;
/**
* Opens a <code>MapViewFrame</code> and initializes it with a
* map of Ulm, provided that a file with name ulm.osm is found
* in the resource/maps path.
* @author Rued... |
package aimax.osm.applications;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JButton;
import javax.swing.JComboBox;
im... |
/**
* Contains useful applications including two stand-alone OSM viewers
* and several demonstrations which combine OSM data with search algorithms
* and agent concepts from the aima-core library.
*/
package aimax.osm.applications; |
package aimax.osm.applications;
import java.awt.Color;
import java.util.HashSet;
import java.util.List;
import aima.core.agent.Agent;
import aima.core.environment.map.BidirectionalMapProblem;
import aima.core.environment.map.MapAgent;
import aima.core.environment.map.MapEnvironment;
import aima.core.environ... |
package aimax.osm.applications;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;
import java.util.Locale;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JToolBar;
import aimax.osm.data.DataResource;
import aimax.osm.data.MapEven... |
package aimax.osm.applications;
import java.io.File;
import java.io.InputStream;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import aima.gui.framework.AgentAppController;
import aima.gui.framework.AgentAppFrame;
import aima.gui.framework.SimpleAgentApp;
import ... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import java.util.logging.Logger;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
imp... |
package aimax.osm.reader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.ParserConfigurationException;
import javax.x... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import java.util.ArrayList;
import java.util.List;
import org.xml.sax.Attributes;
import aimax.osm.data.EntityAttributeManager;
import aimax.osm.data.MapBuilder;
im... |
package aimax.osm.reader;
import java.io.File;
import java.io.InputStream;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.EntityClassifier;
import aimax.osm.data.MapBuilder;
/**
* Common interface for reading maps from file.
* @author R. Lunde
*/
public interface MapReader {
/**
* Sets... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
/**
* Provides the definition of a class receiving tags.
*/
public interface TagListener {
/**
* Processes the tag.
*
* @param tag
* The ta... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import org.xml.sax.Attributes;
import aimax.osm.data.MapBuilder;
/**
* Provides an element processor implementation for an osm element.
* @author Ruediger Lunde
... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import org.xml.sax.Attributes;
import aimax.osm.data.MapBuilder;
/**
* Provides common functionality shared by element processor implementations.
*/
public abstra... |
/**
* This package contains a simple reader for XML files using the
* OSM syntax. To use it, just take a look at classes <code>OsmReader</code>,
* <code>FilteringOsmReader</code>, and <code>Bz2OsmReader</code>.
* The architecture relies on the application of the state
* design pattern (GoF). All element proce... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import org.xml.sax.Attributes;
/**
* Provides an element processor implementation for a tag.
*/
public class TagElementProcessor extends ElementProcessor {
private... |
package aimax.osm.reader;
import org.xml.sax.Attributes;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.MapBuilder;
public class BoundElementProcessor extends ElementProcessor {
private static final String ATTRIBUTE_NAME_BOX = "box";
private static final String ATTRIBUTE_NAME_ORIGIN = "origin";
... |
package aimax.osm.reader;
/**
* The root of the unchecked exception hierarchy for the application.
* All typed runtime exceptions subclass this exception.
* @author R. Lunde
*/
public class OsmRuntimeException extends RuntimeException {
private static final long serialVersionUID = 1L;
/**
... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import java.util.ArrayList;
import java.util.List;
import org.xml.sax.Attributes;
import aimax.osm.data.EntityAttributeManager;
import aimax.osm.data.MapBuilder;
im... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import org.xml.sax.Attributes;
/**
* Provides a no-op implementation of an element processor. This implementation
* is provided to allow nested elements to be ignored... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
/**
* A data class representing a single OSM tag.
*/
public class Tag implements Comparable<Tag> {
/**
* The key identifying the tag.
*/
private St... |
package aimax.osm.reader;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.List;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.EntityClassifier;
import aimax.osm.data.MapBuilder;
import aimax.osm.data.MapBuilderProxy;
import aimax.osm.data.entities.EntityAttribute;
imp... |
package aimax.osm.reader;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Adds bz2 extraction functionality to the <code>FilteringOsmReader</... |
// License: GPL. Copyright 2007-2008 by Brett Henderson and other contributors.
// Modified by Ruediger Lunde, 2009
package aimax.osm.reader;
import org.xml.sax.Attributes;
/**
* Provides an element processor implementation for a way node.
*/
public class WayNodeElementProcessor extends ElementProcessor {
... |
package aimax.osm.routing;
import aima.core.agent.Action;
import aima.core.search.framework.ResultFunction;
/**
* Returns the end node of the movement if an <code>OsmMoveAction</code>
* is provided, otherwise returns the unchanged state.
* @author Ruediger Lunde
*/
public class OsmResultFunction implem... |
/**
* This package contains useful helper classes for applications which apply
* search algorithms from the aima-core library to solve route finding
* problems based on Open Street Map data.
*/
package aimax.osm.routing; |
package aimax.osm.routing;
import aima.core.agent.Action;
import aima.core.search.framework.StepCostFunction;
/**
* Assumes actions of type <code>OsmMoveAction<code> and gets the
* corresponding travel distance.
* @author Ruediger Lunde
*/
public class OsmDistanceStepCostFunction implements StepCostFunc... |
package aimax.osm.routing.agent;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import aima.core.environment.map.Map;
import aima.core.util.Util;
import aima.core.util.datastructure.Point2D;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.MapWayFilter;
import aimax.os... |
package aimax.osm.routing.agent;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Agent;
import aima.core.environment.map.AdaptableHeuristicFunction;
import aima.core.environment.map.BidirectionalMapProblem;
import aima.core.environment.map.MapAgent;
... |
package aimax.osm.routing.agent;
import aima.core.util.datastructure.Point2D;
import aimax.osm.data.Position;
/**
* Special <code>Point2D</code> implementation which provides correct
* distance values in kilometer for geographical positions (x=lon and y=lat).
* @author Ruediger Lunde
*/
public class Poi... |
/**
* This package contains a basis for building map agent applications based
* on OSM data. It provides basic implementations of frame, environment view,
* controller, and also a map adapter which provides access to OSM data using
* the simple aima-core <code>Map</code> interface.
*/
package aimax.osm.routi... |
package aimax.osm.routing.agent;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import javax.swing.JFileChooser;
import javax.swing.JMenuItem;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import aima.core.agent.... |
package aimax.osm.routing.agent;
import aima.gui.applications.search.map.MapAgentFrame;
import aima.gui.applications.search.map.SearchFactory;
/**
* Simple frame for running map agents in maps defined by OSM data.
* @author Ruediger Lunde
*/
public class OsmAgentFrame extends MapAgentFrame {
private s... |
package aimax.osm.routing;
import aima.core.search.framework.DefaultGoalTest;
import aima.core.search.framework.Problem;
import aima.core.search.framework.StepCostFunction;
import aimax.osm.data.MapWayFilter;
import aimax.osm.data.entities.MapNode;
/**
* Implements a route finding problem whose representati... |
package aimax.osm.routing;
import aima.core.search.framework.HeuristicFunction;
import aimax.osm.data.Position;
import aimax.osm.data.entities.MapNode;
/**
* Implements the straight-line-distance heuristic.
* @author Ruediger Lunde
*/
public class OsmSldHeuristicFunction implements HeuristicFunction {
... |
package aimax.osm.routing;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import aima.core.agent.Action;
import aima.core.search.framework.ActionsFunction;
import aimax.osm.data.MapWayFilter;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
import... |
package aimax.osm.routing;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
import aimax.osm.data.Position;
import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;
/**
* Specifies a movement along a way from one way node to another.
* @author Rued... |
package aimax.osm.routing;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
import aima.core.search.framework.GraphSearch;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.framework.Problem;
import aima.core.search.framework.Search;
import aima.co... |
package aimax.osm.viewer;
import aimax.osm.data.BoundingBox;
import aimax.osm.data.Position;
/**
* Class which is responsible for transformations between world
* and view coordinates. It implements an equirectangular projection.
* World coordinates are specified in latitude and longitude, view coordinates
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.