- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.yoVariables.variable.YoInteger.getValue()
方法的一些代码示例,展示了YoInteger.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoInteger.getValue()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoInteger
类名称:YoInteger
方法名:getValue
[英]Retrieves this YoInteger's value as a double.
[中]以双精度形式检索此整数的值。
代码示例来源:origin: us.ihmc/ihmc-yovariables
/** {@inheritDoc} */
@Override
public int getNumberOfVertices()
{
return numberOfVertices.getValue();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public int getCurrentNumberOfWaypoints()
{
return numberOfWaypoints.getValue();
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/** {@inheritDoc} */
@Override
public void updateCentroidAndArea()
{
area = EuclidGeometryPolygonTools.computeConvexPolyong2DArea(vertexBuffer, numberOfVertices.getValue(), clockwiseOrdered, centroid);
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public void set(List<? extends Point3DReadOnly> points)
{
if (points.size() > this.ccwOrderedYoFramePoints.length)
throw new RuntimeException("Cannot plot more vertices than the maximum number");
numberOfPoints.set(points.size());
for (int i = 0; i < numberOfPoints.getValue(); i++)
ccwOrderedYoFramePoints[i].set(points.get(i));
for (int i = numberOfPoints.getValue(); i < ccwOrderedYoFramePoints.length; i++)
ccwOrderedYoFramePoints[i].setToNaN();
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/** {@inheritDoc} */
@Override
public void addVertex(double x, double y)
{
isUpToDate = false;
YoFramePoint2D newVertex = vertexBuffer.get(numberOfVertices.getValue());
if (newVertex == null)
throw new RuntimeException("This polygon has reached its maximum number of vertices.");
newVertex.set(x, y);
numberOfVertices.increment();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private void initializeSubTrajectory(int waypointIndex)
{
int secondWaypointIndex = Math.min(waypointIndex + 1, numberOfWaypoints.getValue() - 1);
subTrajectory.setTrajectoryParameters(waypoints.get(waypointIndex), waypoints.get(secondWaypointIndex));
subTrajectory.initialize();
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public void set(Point3DReadOnly[] points)
{
if (points.length > this.ccwOrderedYoFramePoints.length)
throw new RuntimeException("Cannot plot more vertices than the maximum number");
numberOfPoints.set(points.length);
for (int i = 0; i < numberOfPoints.getValue(); i++)
ccwOrderedYoFramePoints[i].set(points[i]);
for (int i = numberOfPoints.getValue(); i < ccwOrderedYoFramePoints.length; i++)
ccwOrderedYoFramePoints[i].setToNaN();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private double solveMinAcceleration()
{
double cost = 0;
x.clear();
for (int dimension = 0; dimension < dimensions.getValue(); dimension++)
{
cost += solveDimension(dimension, x.add());
}
return cost;
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/** {@inheritDoc} */
@Override
public void removeVertex(int indexOfVertexToRemove)
{
checkNonEmpty();
checkIndexInBoundaries(indexOfVertexToRemove);
if (indexOfVertexToRemove == numberOfVertices.getValue() - 1)
{
numberOfVertices.decrement();
;
return;
}
isUpToDate = false;
swap(vertexBuffer, indexOfVertexToRemove, numberOfVertices.getValue());
numberOfVertices.decrement();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private void initializeSubTrajectory(int waypointIndex)
{
int secondWaypointIndex = Math.min(waypointIndex + 1, numberOfWaypoints.getValue() - 1);
YoFrameEuclideanTrajectoryPoint start = waypoints.get(waypointIndex);
YoFrameEuclideanTrajectoryPoint end = waypoints.get(secondWaypointIndex);
subTrajectory.setCubic(0.0, end.getTime() - start.getTime(), start.getPosition(), start.getLinearVelocity(), end.getPosition(), end.getLinearVelocity());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public boolean isDone()
{
if (isEmpty())
return true;
boolean isLastWaypoint = currentWaypointIndex.getIntegerValue() >= numberOfWaypoints.getIntegerValue() - 2;
if (!isLastWaypoint)
return false;
return currentTrajectoryTime.getValue() >= waypoints.get(currentWaypointIndex.getValue() + 1).getTime();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public boolean isDone()
{
if (isEmpty())
return true;
boolean isLastWaypoint = currentWaypointIndex.getIntegerValue() >= numberOfWaypoints.getIntegerValue() - 2;
if (!isLastWaypoint)
return false;
return currentTrajectoryTime.getValue() >= waypoints.get(currentWaypointIndex.getValue() + 1).getTime();
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/** {@inheritDoc} */
@Override
public void update()
{
if (isUpToDate)
return;
numberOfVertices.set(EuclidGeometryPolygonTools.inPlaceGiftWrapConvexHull2D(vertexBuffer, numberOfVertices.getValue()));
isUpToDate = true;
updateCentroidAndArea();
updateBoundingBox();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void compute(double time)
{
if (isEmpty())
{
throw new RuntimeException("Can not call compute on an empty trajectory.");
}
currentTrajectoryTime.set(time);
if (time < waypoints.get(currentWaypointIndex.getIntegerValue()).getTime())
{
currentWaypointIndex.set(0);
}
while (currentWaypointIndex.getIntegerValue() < numberOfWaypoints.getIntegerValue() - 2
&& time >= waypoints.get(currentWaypointIndex.getIntegerValue() + 1).getTime())
{
currentWaypointIndex.increment();
}
int secondWaypointIndex = Math.min(currentWaypointIndex.getValue() + 1, numberOfWaypoints.getValue() - 1);
YoSpatialWaypoint start = waypoints.get(currentWaypointIndex.getValue());
YoSpatialWaypoint end = waypoints.get(secondWaypointIndex);
double alpha = (time - start.getTime()) / (end.getTime() - start.getTime());
alpha = MathTools.clamp(alpha, 0.0, 1.0);
currentValue.getAngularPart().interpolate(start.getAngularPart(), end.getAngularPart(), alpha);
currentValue.getLinearPart().interpolate(start.getLinearPart(), end.getLinearPart(), alpha);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@Test(timeout = 30000)
public void testSort()
{
YoPreallocatedList<YoInteger> list = new YoPreallocatedList<>(YoInteger.class, "Test", 10, new YoVariableRegistry("Test"));
list.add().set(-3);
list.add().set(20);
list.add().set(-10);
list.add().set(19);
list.add().set(50);
list.sort((o1, o2) -> NumberUtils.compare(o1.getIntegerValue(), o2.getIntegerValue()));
assertTrue(list.get(0).getValue() == -10);
assertTrue(list.get(1).getValue() == -3);
assertTrue(list.get(2).getValue() == 19);
assertTrue(list.get(3).getValue() == 20);
assertTrue(list.get(4).getValue() == 50);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@Test(timeout = 30000)
public void testRemoveIndex()
{
int size = 10;
YoPreallocatedList<YoInteger> list = new YoPreallocatedList<>(YoInteger.class, "Test", size, new YoVariableRegistry("Test"));
for (int i = 0; i < size; i++)
{
list.add().set(i);
}
assertTrue(list.remove(8).getValue() == 8);
assertTrue(list.size() == size - 1);
assertTrue(list.remove(4).getValue() == 4);
assertTrue(list.size() == size - 2);
assertTrue(list.remove(2).getValue() == 2);
assertTrue(list.size() == size - 3);
assertTrue(list.remove(size - 4).getValue() == size - 1);
assertTrue(list.size() == size - 4);
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
@Override
public YoInteger duplicate(YoVariableRegistry newRegistry)
{
IntegerParameter newParameter = new IntegerParameter(getName(), getDescription(), newRegistry, initialValue, (int) getManualScalingMin(), (int) getManualScalingMax());
newParameter.value.set(value.getValue());
newParameter.loadStatus = getLoadStatus();
return newParameter.value;
}
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces
private void updateInternal()
{
stageTime.add(Conversions.millisecondsToSeconds(tickDurationMs));
if (stageTime.getDoubleValue() > 20.0)
{
if (debug)
PrintTools.info("Hard timeout at " + stageTime.getDoubleValue());
return;
}
sendMessageToUI(
"Starting To Plan: " + planId.getValue() + " sequence: " + sequenceId.getValue() + ", using type " + activePlannerEnum.getValue().toString()
+ " on stage " + stageId);
if (debug)
PrintTools.info("Stage " + stageId + " planning steps.");
stepPlanResult = plan();
if (stepPlanResult.validForExecution())
stepPlan.set(getPlanner().getPlan());
for (PlannerCompletionCallback completionCallback : completionCallbackList)
completionCallback.stepPlanningIsComplete(stepPlanResult, this);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
buildConstraintMatrixForDimension(dimension, A, b);
int subProblemSize = coefficients * intervals.getValue();
int constraints = 4 + 3 * nWaypoints.getValue();
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private void buildConstraintMatrixForDimension(int dimension, DenseMatrix64F A, DenseMatrix64F b)
int constraints = 4 + 3 * nWaypoints.getValue();
int subProblemSize = coefficients * intervals.getValue();
A.reshape(constraints, subProblemSize);
b.reshape(constraints, 1);
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getValueString()方法的一些代码示例,展示了YoVariable.getValueSt
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.setValueFromLongBits()方法的一些代码示例,展示了YoVariable.setV
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getDescription()方法的一些代码示例,展示了YoVariable.getDescrip
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getFullNameWithNameSpace()方法的一些代码示例,展示了YoVariable.
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getManualScalingMin()方法的一些代码示例,展示了YoVariable.getMa
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getValueAsLongBits()方法的一些代码示例,展示了YoVariable.getVal
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getYoVariableType()方法的一些代码示例,展示了YoVariable.getYoVa
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getManualScalingMax()方法的一些代码示例,展示了YoVariable.getMa
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getYoVariableRegistry()方法的一些代码示例,展示了YoVariable.get
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.isParameter()方法的一些代码示例,展示了YoVariable.isParameter()
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getParameter()方法的一些代码示例,展示了YoVariable.getParameter
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.setValueFromDouble()方法的一些代码示例,展示了YoVariable.setVal
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getValueAsDouble()方法的一些代码示例,展示了YoVariable.getValue
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getName()方法的一些代码示例,展示了YoVariable.getName()的具体用法。这些
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.addVariableChangedListener()方法的一些代码示例,展示了YoVariabl
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable类的一些代码示例,展示了YoVariable类的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中us.ihmc.yoVariables.variable.YoLong类的一些代码示例,展示了YoLong类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中us.ihmc.yoVariables.variable.YoFrameVector3D类的一些代码示例,展示了YoFrameVector3D类的具体用法。这些代码示例主要来源于G
本文整理了Java中us.ihmc.yoVariables.variable.YoEnum类的一些代码示例,展示了YoEnum类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中us.ihmc.yoVariables.variable.YoFramePoint3D类的一些代码示例,展示了YoFramePoint3D类的具体用法。这些代码示例主要来源于Git
我是一名优秀的程序员,十分优秀!