<commit_before>/****************************************************************************
 * Copyright 2014 <NAME>
 * This library is distributed under the terms of the Apache V2.0 
 * License (obtainable from http://www.apache.org/licenses/LICENSE-2.0).
 ****************************************************************************/

using boost::shared_ptr;

/// Sets up a default moving transform
MOVINGTRANSFORM3::MOVINGTRANSFORM3()
{
  source = boost::shared_ptr<const POSE3>();
  target = boost::shared_ptr<const POSE3>();
  r.set_zero();
  E.set_identity();
  rdot.set_zero();
  Edot.set_zero();
}

/// Copies a moving transform to another
MOVINGTRANSFORM3& MOVINGTRANSFORM3::operator=(const MOVINGTRANSFORM3& source)
{
  this->source = source.source;
  this->target = source.target;
  this->r = source.r;
  this->E = source.E;
  this->rdot = source.rdot;
  this->Edot = source.Edot;
  return *this;
}

/// Transforms a spatial acceleration (defined relative to the source frame's relative pose) to a spatial acceleration (relative to the target frame's relative pose)
SACCEL MOVINGTRANSFORM3::transform(const SACCEL& a) const
{
  #ifndef NEXCEPT
  if (a.pose != source || v.pose != source)
    throw FrameException();
  #endif

  // setup r and rdot as vectors
  VECTOR3 rv(r, source);
  VECTOR3 rdotv(rdot, source);
<commit_msg>Fixed another bug in moving transform<commit_after>/****************************************************************************
 * Copyright 2014 <NAME>
 * This library is distributed under the terms of the Apache V2.0 
 * License (obtainable from http://www.apache.org/licenses/LICENSE-2.0).
 ****************************************************************************/

using boost::shared_ptr;

/// Sets up a default moving transform
MOVINGTRANSFORM3::MOVINGTRANSFORM3()
{
  source = boost::shared_ptr<const POSE3>();
  target = boost::shared_ptr<const POSE3>();
  r.set_zero();
  E.set_identity();
  rdot.set_zero();
  Edot.set_zero();
}

/// Copies a moving transform to another
MOVINGTRANSFORM3& MOVINGTRANSFORM3::operator=(const MOVINGTRANSFORM3& source)
{
  this->source = source.source;
  this->target = source.target;
  this->r = source.r;
  this->E = source.E;
  this->rdot = source.rdot;
  this->Edot = source.Edot;
  this->v = source.v;
  return *this;
}

/// Transforms a spatial acceleration (defined relative to the source frame's relative pose) to a spatial acceleration (relative to the target frame's relative pose)
SACCEL MOVINGTRANSFORM3::transform(const SACCEL& a) const
{
  #ifndef NEXCEPT
  if (a.pose != source || v.pose != source)
    throw FrameException();
  #endif

  // setup r and rdot as vectors
  VECTOR3 rv(r, source);
  VECTOR3 rdotv(rdot, source);

{'fraction_non_alphanumeric': 0.22413793103448276, 'fraction_numerical': 0.013206162876008804, 'mean_word_length': 4.789808917197452, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1970260', 'n_tokens_mistral': 854, 'n_tokens_neox': 817, 'n_words': 231}