Package ca.nengo.model

Examples of ca.nengo.model.Units


   * @see ca.nengo.model.Origin#getValues()
   */
  public InstantaneousOutput getValues() throws SimulationException {
    InstantaneousOutput result = null;
   
    Units units = myNodeOrigins[0].getValues().getUnits(); //must be same for all
   
    if (myNodeOrigins[0].getValues() instanceof RealOutput) {
      result = composeRealOutput(myNodeOrigins, units);
    } else if (myNodeOrigins[0].getValues() instanceof PreciseSpikeOutput) {
      result = composePreciseSpikeOutput(myNodeOrigins, units);     
View Full Code Here


    super(Units.class);
  }

  @Override
  public Component getEditor(Object o, ConfigurationChangeListener listener, JComponent parent) {
    Units unit = (Units) o;

    final JComboBox result = new JComboBox(myList);
    result.setSelectedItem(unit);

    listener.setProxy(new ConfigurationChangeListener.EditorProxy() {
View Full Code Here

    return result;
  }

  @Override
  public Object fromString(String s) {
    Units result = null;

    for (int i = 0; i < myList.length && result == null; i++) {
      if (s.equals(myList[i].toString())) {
        result = myList[i];
      }
View Full Code Here

      return myOrigins;
    }
   
    public void setValues(InstantaneousOutput values) {
      float time = values.getTime();
      Units units = values.getUnits();

      float[] vals;
      if(values instanceof RealOutput)
        vals = ((RealOutput)values).getValues();
      else if(values instanceof PreciseSpikeOutput) {
View Full Code Here

    }

    public InstantaneousOutput getValues() throws SimulationException {
      InstantaneousOutput v0 = myOrigins[0].getValues();
     
      Units unit = v0.getUnits();
      float time = v0.getTime();
     
      if(v0 instanceof PreciseSpikeOutputImpl) {
        float[] vals = new float[myDimensions];
        int d=0;
View Full Code Here

    }

    public InstantaneousOutput getValues() throws SimulationException {
      InstantaneousOutput v0 = myOrigins[0].getValues();
     
      Units unit = v0.getUnits();
      float time = v0.getTime();
     
      if(v0 instanceof RealOutputImpl) {
        float[] vals = new float[myOrigins[0].getDimensions()];
        for(int i = 0; i < myOrigins.length; i++) {
View Full Code Here

TOP

Related Classes of ca.nengo.model.Units

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.