Package org.codemap

Examples of org.codemap.Configuration


    @Test
    public void nearestNeighborRegression() {
        final HashMap<Point, Integer> points = new HashMap<Point, Integer>();
        QuickNDirtyMap.anotherDebugPointSet(points);
     
        Configuration configuration = new Configuration(points.keySet());
        MapInstance mapInstance = configuration.withSize(mapSize, new MapScheme<Double>() {
            @Override
            public Double forLocation(Point location) {
                // TODO fill in size
                return (double) points.get(location);
View Full Code Here


//        addLedPoints(points);
//        addEdgePoints(points);
//        addDebugPoints(points);
        anotherDebugPointSet(points);
       
        Configuration configuration = new Configuration(points.keySet());
       
        ArrayList<Label> labels = new ArrayList<Label>();
        for(Point each: points.keySet()) {
            int x = toMapCoords(each.x);
            int y = toMapCoords(each.y);
            org.eclipse.swt.graphics.Point extent = new org.eclipse.swt.graphics.Point(x, y);
            int fontsize = (points.get(each))/3;
            labels.add(new Label(x-20, y-60, extent, fontsize, each.getDocument(), new Location(each, 0, x, y)));
        }
        labeling = new Labeling(labels);
       
        MapInstance mapInstance = configuration.withSize(mapSize, new MapScheme<Double>() {
            @Override
            public Double forLocation(Point location) {
                // TODO fill in size
                return (double) points.get(location);
View Full Code Here

    public Configuration previousConfiguration;
   
    public ComputeConfigurationTask(Value<LatentSemanticIndex> index) {
        super("Computing map layout...", index);
        this.previousConfiguration = new Configuration();
    }
View Full Code Here

    @Override
    protected MapInstance computeValue(ProgressMonitor monitor, Arguments args) {
        int size = args.nextOrFail();
        final LatentSemanticIndex index = args.nextOrFail();
        Configuration configuration = args.nextOrFail();
        return configuration.withSize(size, new MapScheme<Double>() {
            @Override
            public Double forLocation(Point location) {
//                return Math.max(1, Math.log(index.getDocumentLength(location.getDocument())));
//                return Math.cbrt(index.getDocumentLength(location.getDocument()));
                return Math.sqrt(index.getDocumentLength(location.getDocument()));
View Full Code Here

            y[n] = p.y;
            n++;
        }
       
        Collection<Point> locations = doLayout ? runLayout(lsi, x, y) : loadCached(lsi, x, y);
        return new Configuration(locations).normalize();
    }
View Full Code Here

TOP

Related Classes of org.codemap.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.