gpt4 book ai didi

us.ihmc.robotics.math.frames.YoMatrix.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 05:57:31 27 4
gpt4 key购买 nike

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

YoMatrix.<init>介绍

暂无

代码示例

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

public CVXMomentumOptimizerAdapter(int nDoF, YoVariableRegistry registry)
{
 rhoSize = CVXMomentumOptimizerWithGRFPenalizedSmootherNative.rhoSize;
 nSupportVectors = CVXMomentumOptimizerWithGRFPenalizedSmootherNative.nSupportVectors;
 nPointsPerPlane = CVXMomentumOptimizerWithGRFPenalizedSmootherNative.nPointsPerPlane;
 nPlanes = CVXMomentumOptimizerWithGRFPenalizedSmootherNative.nPlanes;
 momentumOptimizerWithGRFPenalizedSmootherNative = new CVXMomentumOptimizerWithGRFPenalizedSmootherNative(nDoF, rhoSize);
 momentumOptimizerWithGRFPenalizedSmootherNativeInput = new CVXMomentumOptimizerWithGRFPenalizedSmootherNativeInput();
 outputRho = new DenseMatrix64F(rhoSize, 1);
 rhoPrevious = new DenseMatrix64F(rhoSize, 1);
 rhoPreviousYoMatrix = new YoMatrix("rhoPreviousYoMatrix", rhoSize, 1, registry);
}

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

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testYoMatrixSetToZero()
{
 int maxNumberOfRows = 4;
 int maxNumberOfColumns = 8;
 String name = "testMatrixForZero";
 
 YoVariableRegistry registry = new YoVariableRegistry("testRegistry");
 YoMatrix yoMatrix = new YoMatrix(name, maxNumberOfRows, maxNumberOfColumns, registry);
 
 Random random = new Random(1984L);
 DenseMatrix64F randomMatrix = RandomGeometry.nextDenseMatrix64F(random, maxNumberOfRows, maxNumberOfColumns);
 yoMatrix.set(randomMatrix);
 
 int numberOfRows = 2;
 int numberOfColumns = 6;
 yoMatrix.setToZero(numberOfRows, numberOfColumns);
 
 DenseMatrix64F zeroMatrix = new DenseMatrix64F(numberOfRows, numberOfColumns);
 checkMatrixYoVariablesEqualsCheckMatrixAndOutsideValuesAreNaN(name, maxNumberOfRows, maxNumberOfColumns, zeroMatrix, registry);  
}

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

desiredCoPCommandInSoleFrame = new YoFramePoint2d(namePrefix + "DesiredCoPCommand", planeFrame, registry);
yoRho = new YoMatrix(namePrefix + "Rho", rhoSize, 1, registry);

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

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testSimpleYoMatrixExample()
{
 int maxNumberOfRows = 4;
 int maxNumberOfColumns = 8;
 YoVariableRegistry registry = new YoVariableRegistry("testRegistry");
 YoMatrix yoMatrix = new YoMatrix("testMatrix", maxNumberOfRows, maxNumberOfColumns, registry);
 assertEquals(maxNumberOfRows, yoMatrix.getNumberOfRows());
 assertEquals(maxNumberOfColumns, yoMatrix.getNumberOfColumns());
 DenseMatrix64F denseMatrix = new DenseMatrix64F(maxNumberOfRows, maxNumberOfColumns);
 yoMatrix.get(denseMatrix);
 JUnitTools.assertMatrixEqualsZero(denseMatrix, 1e-10);
 Random random = new Random(1984L);
 DenseMatrix64F randomMatrix = RandomGeometry.nextDenseMatrix64F(random, maxNumberOfRows, maxNumberOfColumns);
 yoMatrix.set(randomMatrix);
 DenseMatrix64F checkMatrix = new DenseMatrix64F(maxNumberOfRows, maxNumberOfColumns);
 yoMatrix.get(checkMatrix);
 JUnitTools.assertMatrixEquals(randomMatrix, checkMatrix, 1e-10);
 assertEquals(registry.getVariable("testMatrix_0_0").getValueAsDouble(), checkMatrix.get(0, 0), 1e-10);
}

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

YoMatrix yoMatrix = new YoMatrix(name, maxNumberOfRows, maxNumberOfColumns, registry);

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

String name = "testMatrix";
YoVariableRegistry registry = new YoVariableRegistry("testRegistry");
YoMatrix yoMatrix = new YoMatrix(name, maxNumberOfRows, maxNumberOfColumns, registry);

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