gpt4 book ai didi

us.ihmc.yoVariables.variable.YoVariable.getName()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 13:12:40 30 4
gpt4 key购买 nike

本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getName()方法的一些代码示例,展示了YoVariable.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoVariable.getName()方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoVariable
类名称:YoVariable
方法名:getName

YoVariable.getName介绍

[英]Retrieves the name of this YoVariable.
[中]检索此变量的名称。

代码示例

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public String[] getCreatedVariableNames()
{
 String[] ret = new String[createdVariables.length];
 for (int i = 0; i < createdVariables.length; i++)
 {
   ret[i] = createdVariables[i].getName();
 }
 return ret;
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

public boolean containsVariable(YoVariable<?> variable)
{
 String variableName = variable.getName();
 ArrayList<YoVariable<?>> arrayList = variablesMappedByName.get(variableName);
 if ((arrayList != null) && (arrayList.contains(variable)))
   return true;
 return false;
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

public synchronized String[] getVariableNames()
{
 String[] ret = new String[variables.size()];
 for (int i = 0; i < variables.size(); i++)
 {
   ret[i] = variables.get(i).getName();
 }
 return ret;
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

public void removeVariable(YoVariable<?> variable)
{
 String variableName = variable.getName();
 if (variablesMappedByName.containsKey(variableName))
 {
   ArrayList<YoVariable<?>> arrayList = variablesMappedByName.get(variableName);
   arrayList.remove(variable);
   variables.remove(variable);
 }
}

代码示例来源:origin: us.ihmc/ihmc-whole-body-controller

public void printOutCorruptorVariablesToOptimize()
{
 System.out.println();
 for (YoVariable<?> yoVariable : corruptorVariablesToOptimize)
 {
   System.out.println(yoVariable.getName() + " = " + formatNumber(yoVariable) + ";");
 }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

private void setupInitialRobot(double[] initialSetup)
{
 for (int i = 0; i < allVariables.length; i++)
 {
   double initialValue = initialSetup[i];
   YoVariable<?> variable = allVariables[i];
   System.out.println(variable.getName() + ": " + initialValue);
   variable.setValueFromDouble(initialValue);
 }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

private void printState()
{
 for (int i = 0; i < outputStateVariables.length; i++)
 {
   YoVariable<?> var = outputStateVariables[i];
   if (var != null)
   {
    System.out.println(var.getName() + ": " + var.getValueAsDouble());
   }
 }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-test

private static boolean areYoVariablesEqual(YoVariable<?> var1, YoVariable<?> var2)
{
  return StringUtils.equals(var1.getName(), var2.getName())  &&
      var1.getValueAsDouble() == var2.getValueAsDouble();
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

public DataBufferEntry addVariable(YoVariable<?> newVariable, int nPoints)
{
 addVariableToHolder(newVariable);
 yoVariableSet.add(newVariable);
 DataBufferEntry entry = new DataBufferEntry(newVariable, nPoints);
 this.addEntry(entry);
 if (newVariable.getName().equals("t"))
 {
   t = (YoDouble) newVariable;
 }
 return entry;
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public void createDataOneVsDataTwoGraph(File directory, String fileHeader, DataBufferEntry dataOneEntry, DataBufferEntry dataTwoEntry, boolean createJPG,
                    boolean createPDF, String title, String xLabel, String yLabel, Color color)
{
 JFreeGraph graph = JFreeGraph.createDataOneVsDataTwoGraph(dataOneEntry, dataTwoEntry, title, xLabel, yLabel, color);
 String graphName = fileHeader + "_" + dataOneEntry.getVariable().getName() + "_Vs_" + dataTwoEntry.getVariable().getName();
 saveGraphToFile(directory, graphName, graph, createJPG, createPDF);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-test

private String[] getAllVariableNamesFromRegistry(YoVariableRegistry registry)
{
 int numberOfVariables = registry.getNumberOfYoVariables();
 String[] names = new String[numberOfVariables];
 for (int i = 0; i < numberOfVariables; i++)
 {
   names[i] = registry.getYoVariable(i).getName();
 }
 return names;
}

代码示例来源:origin: us.ihmc/ihmc-humanoid-behaviors

@Override
  public void notifyOfVariableChange(YoVariable<?> v)
  {
   sendToBehavior(v.getName(), v.getValueAsDouble());
  }
});

代码示例来源:origin: us.ihmc/ihmc-humanoid-behaviors

@Override
  public void notifyOfVariableChange(YoVariable<?> v)
  {
   sendToUI(v.getName(), v.getValueAsDouble());
  }
});

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public static JFreeGraph createDataOneVsDataTwoGraph(DataBufferEntry dataOneEntry, DataBufferEntry dataTwoEntry, Color plotColor)
{
 String dataOneVariableName = dataOneEntry.getVariable().getName();
 String dataTwoVariableName = dataTwoEntry.getVariable().getName();
 String title = dataOneVariableName + "_Vs_" + dataTwoVariableName;
 return createDataOneVsDataTwoGraph(dataOneEntry, dataTwoEntry, title, dataOneEntry.getVariableName(), dataTwoEntry.getVariableName(), plotColor);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public void createDataVsTimeGraph(File directory, String fileHeader, DataBufferEntry dataBufferEntry, boolean createJPG, boolean createPDF, Color color)
{
 JFreeGraph graph = JFreeGraph.createDataVsTimeGraph(timeEntry, dataBufferEntry, color);
 String graphName = fileHeader + "_" + dataBufferEntry.getVariable().getName();
 saveGraphToFile(directory, graphName, graph, createJPG, createPDF);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public void setSlider(int channel, YoVariable<?> var, double min, double max, double exponent, double hires)
{
 if (var == null)
 {
   PrintTools.error(this, "YoVariable was null. It's not getting added to the sliderboard");
   return;
 }
 setControl(channelMapper.getSliderChannel(channel), var, var.getName(), min, max, exponent, hires, MidiControl.SliderType.NUMBER, MidiControl.ControlType.SLIDER);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public void setKnob(int channel, YoVariable<?> var, double min, double max, double exponent, double hires)
{
 if (var == null)
 {
   PrintTools.error(this, "YoVariable was null. It's not getting added to the sliderboard");
   return;
 }
 setControl(channelMapper.getKnobChannel(channel), var, var.getName(), min, max, exponent, hires, MidiControl.SliderType.NUMBER, MidiControl.ControlType.KNOB);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public void createDataVsTimeGraph(File directory, String fileHeader, DataBufferEntry dataBufferEntry, boolean createJPG, boolean createPDF, String xLabel, String yLabel, Color color)
{
 JFreeGraph graph = JFreeGraph.createDataVsTimeGraph(timeEntry, dataBufferEntry, dataBufferEntry.getVariableName(), xLabel, yLabel, color);
 String graphName = fileHeader + "_" + dataBufferEntry.getVariable().getName();
 saveGraphToFile(directory, graphName, graph, createJPG, createPDF);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-test

private String getLastVariableNameFromRobotRegistry(Robot robotModel)
{
 int lastIndex = robotModel.getRobotsYoVariableRegistry().getAllVariablesArray().length - 1;
 return robotModel.getRobotsYoVariableRegistry().getAllVariablesArray()[lastIndex].getName();
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public static JFreeGraph createDataVsTimeGraph(DataBufferEntry timeEntry, DataBufferEntry dataEntry, String title, String xLabel, String yLabel, Color plotColor)
{
 String variableName = dataEntry.getVariable().getName();
 JFreePlot plot = new JFreePlot("time vs " + variableName, timeEntry, dataEntry);
 plot.setIsScatterPlot(false);
 plot.setColor(plotColor);
 JFreeGraph graph = new JFreeGraph(title, xLabel, yLabel);
 graph.addPlot(plot);
 return graph;
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com