Examples of map()


Examples of ca.nengo.math.impl.Polynomial.map()

    CurveFitter lcf = new LinearCurveFitter();
    float[][] values = new float[2][10];
   
    for (int i=0; i<values[0].length; i++) {
      values[0][i] = -9 + i * 2;
      values[1][i] = target.map(new float[]{values[0][i]});
    }
   
    Function fitted = lcf.fit(values[0], values[1]);
   
//    Plotter.plot(target, -10, 0.1f, 10, "target");
View Full Code Here

Examples of ca.nengo.math.impl.PostfixFunction.map()

    PostfixFunction f = null;
   
    ArrayList<Serializable> l = new ArrayList<Serializable>();
    l.add(new Float(5.5f));
    f = new PostfixFunction(l, "", 0);
    TestUtil.assertClose(5.5f, f.map(new float[0]), .0001f);

    l.clear();
    l.add(Integer.valueOf(0));
    f = new PostfixFunction(l, "", 1);
    TestUtil.assertClose(1f, f.map(new float[]{1f}), .0001f);
View Full Code Here

Examples of ca.nengo.math.impl.SigmoidFunction.map()

  /*
   * Test method for 'ca.nengo.math.impl.SigmoidFunction.map(float[])'
   */
  public void testMap() {
    SigmoidFunction f = new SigmoidFunction();
    TestUtil.assertClose(0.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{100}), .00001f);
    TestUtil.assertClose(0.952574f, f.map(new float[]{3}), .00001f);
    f = new SigmoidFunction(0f,1f,2f,3f);
    TestUtil.assertClose(2f, f.map(new float[]{-100}), .00001f);
    TestUtil.assertClose(2.5f, f.map(new float[]{0}), .00001f);
View Full Code Here

Examples of ca.nengo.math.impl.SineFunction.map()

  /*
   * Test method for 'ca.nengo.math.impl.SineFunction.map(float[])'
   */
  public void testMap() {
    SineFunction f = new SineFunction(0.5f);
    TestUtil.assertClose(0f, f.map(new float[]{0f}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{(float)Math.PI}), .00001f);
    TestUtil.assertClose(0.84147f, f.map(new float[]{2f}), .00001f);
  }

  /*
 
View Full Code Here

Examples of com.caucho.rewrite.DispatchRule.map()

    }

    for (int i = tail - 1; index <= i; i--) {
      DispatchRule rule = _ruleList.get(i);
   
      next = rule.map(type, uri, queryString, next, chain);
    }

    return next;
  }
View Full Code Here

Examples of com.datasift.client.cli.Parser.CliArguments.map()

        endpoint.setDefault("core");
        switches.add(endpoint);
        switches.add(new CliSwitch("p", "param"));
        CliArguments parsedArgs = Parser.parse(args, switches);

        Map<String, String> auth = parsedArgs.map("a");
        if (auth == null || auth.size() == 0) {
            System.out.println("Auth must be provided in the form '-a[uth] username api_key'");
            System.exit(0);
        }
View Full Code Here

Examples of com.github.jmkgreen.morphia.Morphia.map()

            return;
        }
        try {
            final MongoClient mongoClient = new MongoClient(ConfigurationHelper.prop.getProperty("mongo.host") );
            final Morphia morphia = new Morphia();
            morphia.map(Meteolog.class).map(News.class).map(Cache.class).map(MapReduceMinMax.class).map(MapReduceHistoryMinMax.class);
            ds = morphia.createDatastore(mongoClient, ConfigurationHelper.prop.getProperty("mongo.dbname"));
            ds.ensureCaps();
            ds.ensureIndexes();
        } catch (Exception e) {
            throw new RuntimeException("Error initializing mongo db", e);
View Full Code Here

Examples of com.google.code.morphia.Morphia.map()

                m.mapPackage(packageName, ignoreInvalidClasses);
            }
        }
        if (mapClasses != null) {
            for (String entityClass : mapClasses) {
                m.map(Class.forName(entityClass));
            }
        }
        return m;
    }
View Full Code Here

Examples of com.khs.sherpa.servlet.RequestMapper.map()

            break;
          }
        }
       
      }
      params[i] = map.map(method.getClass().getName(),method.getName(),type, annotation)
    }
    return params;
  }
 
  private boolean isRestful() {
View Full Code Here

Examples of com.mozilla.grouperfish.naming.Scope.map()

        assertEquals(
                ns.queries(), ns.resourceMap(QueriesResource.class));
        assertEquals(
                ns.results(), ns.resourceMap(ResultsResource.class));
        assertEquals(
                ns.map(Type.CONFIGURATION_FILTER),
                ns.resourceMap(ConfigurationsResource.FilterConfigsResource.class));
        assertEquals(
                ns.map(Type.CONFIGURATION_TRANSFORM),
                ns.resourceMap(ConfigurationsResource.TransformConfigsResource.class));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.