Tabnine Logo
RecyclingArrayList
Code IndexAdd Tabnine to your IDE (free)

How to use
RecyclingArrayList
in
us.ihmc.robotics.lists

Best Java code snippets using us.ihmc.robotics.lists.RecyclingArrayList (Showing top 20 results out of 315)

origin: us.ihmc/IHMCHumanoidRobotics

public void setPredictedContactPoints(RecyclingArrayList<Point2d> predictedContactPoints)
{
 this.predictedContactPoints.clear();
 for(int i = 0; i < predictedContactPoints.size(); i++)
   this.predictedContactPoints.add().set(predictedContactPoints.get(i));
}
origin: us.ihmc/IHMCRoboticsToolkit

public FrameTrajectoryPointList(Class<F> frameTrajectoryPointClass)
{
 trajectoryPoints = new RecyclingArrayList<>(frameTrajectoryPointClass);
}
origin: us.ihmc/IHMCRoboticsToolkit

/**
* Returns the last element of this list.
* If the list is empty, it returns {@code null}.
* @return the last element of this list
*/
public T getLast()
{
 if (isEmpty())
   return null;
 else
   return unsafeGet(size - 1);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void addTimeOffset(double timeOffsetToAdd)
{
 for (int i = 0; i < trajectoryPoints.size(); i++)
   trajectoryPoints.get(i).addTimeOffset(timeOffsetToAdd);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void addTrajectoryPoint(P trajectoryPoint)
{
 trajectoryPoints.add().set(trajectoryPoint);
}
origin: us.ihmc/CommonWalkingControlModules

@Override
public void setWaypoints(ArrayList<FramePoint> waypointPositions)
{
 if (waypointPositions.size() > maxWaypoints)
   throw new RuntimeException("Too many waypoints");
 this.waypointPositions.clear();
 coefficients.clear();
 coefficients.add();
 for (int i = 0; i < waypointPositions.size(); i++)
 {
   waypointPosition.setIncludingFrame(waypointPositions.get(i));
   waypointPosition.changeFrame(swingFrame);
   TDoubleArrayList waypoint = this.waypointPositions.add();
   waypoint.set(0, this.waypointPosition.getX());
   waypoint.set(1, this.waypointPosition.getZ());
   coefficients.add();
 }
 optimizer.setWaypoints(this.waypointPositions);
 segments.set(waypointPositions.size() + 1);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void clear()
{
 trajectoryPoints.clear();
}
origin: us.ihmc/IHMCRoboticsToolkit

public boolean constructFromInteriorOfRays(List<Line2d> rays, ConvexPolygon2d polygonToPack)
 removeRay.clear();
   removeRay.getAndGrowIfNeeded(i).setValue(false);
   if (removeRay.get(rayIndex).booleanValue())
    if (removeRay.get(previousIndexToCheck).booleanValue())
      continue;    // That ray was removed already. Check a previous ray.
      removeRay.get(previousIndexToCheck).setValue(true);
      removeIntersectionPoint(intersectionPoints, previousIndexToCheck);
      if (removeRay.get(evenMorePreviousIndexToCheck).booleanValue())
       continue;    // That ray was removed already. Check a previous ray.
      Line2d evenMorePreviousRayToCheck = rays.get(evenMorePreviousIndexToCheck);
       removeRay.get(previousIndexToCheck).setValue(true);
       removeIntersectionPoint(intersectionPoints, previousIndexToCheck);
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public F getTrajectoryPoint(int trajectoryPointIndex)
{
 return trajectoryPoints.get(trajectoryPointIndex);
}
origin: us.ihmc/CommonWalkingControlModules

if (footstepData.getPredictedContactPoints().isEmpty())
  contactPoints = null;
else
  for (int i = 0; i < footstepData.getPredictedContactPoints().size(); i++)
   contactPoints.add(footstepData.getPredictedContactPoints().get(i));
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public int getNumberOfTrajectoryPoints()
{
 return trajectoryPoints.size();
}
origin: us.ihmc/IHMCRoboticsToolkit

/**
* Add a new element at the end of this list.
* @return the new element.
*/
public T add()
{
 return getAndGrowIfNeeded(size);
}
origin: us.ihmc/IHMCHumanoidRobotics

  @Override
  public boolean isCommandValid()
  {
   return timestamp != -1L && !scan.isEmpty();
  }
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public P getLastTrajectoryPoint()
{
 return trajectoryPoints.getLast();
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void subtractTimeOffset(double timeOffsetToSubtract)
{
 for (int i = 0; i < trajectoryPoints.size(); i++)
   trajectoryPoints.get(i).subtractTimeOffset(timeOffsetToSubtract);
}
origin: us.ihmc/IHMCRoboticsToolkit

protected F addAndInitializeTrajectoryPoint()
{
 F newTrajectoryPoint = trajectoryPoints.add();
 newTrajectoryPoint.setToZero(referenceFrame);
 return newTrajectoryPoint;
}
origin: us.ihmc/CommonWalkingControlModules

/**
* Resets the optimizer and removes all waypoints as well as previous start and end conditions.
*/
public void reset()
{
 initialPosition.setToNaN(trajectoryFrame);
 initialVelocity.setToNaN(trajectoryFrame);
 finalPosition.setToNaN(trajectoryFrame);
 finalVelocity.setToNaN(trajectoryFrame);
 segments.set(1);
 this.waypointPositions.clear();
 optimizer.setWaypoints(waypointPositions);
 coefficients.clear();
 coefficients.add();
}
origin: us.ihmc/IHMCHumanoidRobotics

public void clear(RobotSide robotSide)
{
 commandId = Packet.VALID_MESSAGE_DEFAULT_ID;
 jointTrajectoryInputs.clear();
 this.robotSide = robotSide;
 executionMode = null;
 previousCommandId = Packet.INVALID_MESSAGE_ID;
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public P getTrajectoryPoint(int trajectoryPointIndex)
{
 return trajectoryPoints.get(trajectoryPointIndex);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public int getNumberOfTrajectoryPoints()
{
 return trajectoryPoints.size();
}
us.ihmc.robotics.listsRecyclingArrayList

Most used methods

  • get
    Returns the element at the specified position in this list.
  • add
    Unsupported operation.
  • clear
    Sets the size of the list to 0, but does not change its capacity. This method is meant to recycle a
  • size
    Returns the number of elements in this list.
  • <init>
  • isEmpty
    Returns true if this list contains no elements.
  • getAndGrowIfNeeded
    Returns the element at the specified position in this list. The list will grow if the given index is
  • getLast
    Returns the last element of this list. If the list is empty, it returns null.
  • remove
    Removes the first occurrence of the specified element from this list, if it is present. If the list
  • checkWithMaxCapacity
  • ensureCapacity
  • fillElementDataIfNeeded
  • ensureCapacity,
  • fillElementDataIfNeeded,
  • indexOf,
  • positiveIndexCheck,
  • rangeCheck,
  • rangeCheckForInsert,
  • toArray,
  • unsafeFastSwap,
  • unsafeGet,
  • unsafeGrowByN

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now