Index: src/FunctionApproximation/Extractors.cpp
===================================================================
--- src/FunctionApproximation/Extractors.cpp	(revision 16c6f7843f246e0e7ac0521b380137a10e710076)
+++ src/FunctionApproximation/Extractors.cpp	(revision e47ac71b3e565b9051aaee9368699525a439737e)
@@ -55,41 +55,4 @@
 
 using namespace boost::assign;
-
-FunctionModel::arguments_t
-Extractors::gatherAllDistanceArguments(
-    const Fragment::positions_t& positions,
-    const Fragment::charges_t& charges,
-    const size_t globalid)
-{
-  FunctionModel::arguments_t result;
-
-  // go through current configuration and gather all other distances
-  Fragment::positions_t::const_iterator firstpositer = positions.begin();
-  for (;firstpositer != positions.end(); ++firstpositer) {
-    Fragment::positions_t::const_iterator secondpositer = positions.begin();//firstpositer;
-    for (; secondpositer != positions.end(); ++secondpositer) {
-      if (firstpositer == secondpositer)
-        continue;
-      argument_t arg;
-      const Vector firsttemp((*firstpositer)[0],(*firstpositer)[1],(*firstpositer)[2]);
-      const Vector secondtemp((*secondpositer)[0],(*secondpositer)[1],(*secondpositer)[2]);
-      arg.distance = firsttemp.distance(secondtemp);
-      arg.types = std::make_pair(
-          charges[ std::distance(positions.begin(), firstpositer) ],
-          charges[ std::distance(positions.begin(), secondpositer) ]
-          );
-      arg.indices = std::make_pair(
-          std::distance(
-              positions.begin(), firstpositer),
-          std::distance(
-              positions.begin(), secondpositer)
-          );
-      arg.globalid = globalid;
-      result.push_back(arg);
-    }
-  }
-
-  return result;
-}
 
 FunctionModel::arguments_t
@@ -131,44 +94,4 @@
 }
 
-Fragment::positions_t Extractors::_detail::gatherPositionsFromTargets(
-    const Fragment::positions_t& positions,
-    const Fragment::charges_t& charges,
-    const chargeiters_t &targets
-    )
-{
-  Fragment::positions_t filtered_positions;
-  for (chargeiters_t::const_iterator firstpairiter = targets.begin();
-      firstpairiter != targets.end(); ++firstpairiter) {
-    Fragment::positions_t::const_iterator positer = positions.begin();
-    const size_t steps = std::distance(charges.begin(), *firstpairiter);
-    std::advance(positer, steps);
-    filtered_positions.push_back(*positer);
-  }
-  return filtered_positions;
-}
-
-FunctionModel::arguments_t Extractors::_detail::gatherDistancesFromTargets(
-    const Fragment::positions_t& positions,
-    const Fragment::charges_t& charges,
-    const chargeiters_t &targets,
-    const size_t globalid
-    )
-{
-  Fragment::positions_t filtered_positions;
-  Fragment::charges_t filtered_charges;
-  for (chargeiters_t::const_iterator firstpairiter = targets.begin();
-      firstpairiter != targets.end(); ++firstpairiter) {
-    Fragment::positions_t::const_iterator positer = positions.begin();
-    const size_t steps = std::distance(charges.begin(), *firstpairiter);
-    std::advance(positer, steps);
-    filtered_positions.push_back(*positer);
-    filtered_charges.push_back(**firstpairiter);
-  }
-  return Extractors::gatherAllSymmetricDistanceArguments(
-      filtered_positions,
-      filtered_charges,
-      globalid);
-}
-
 Extractors::elementcounts_t 
 Extractors::_detail::getElementCounts(
@@ -188,363 +111,4 @@
   return elementcounts;
 }
-
-Extractors::elementtargets_t 
-Extractors::_detail::convertElementcountsToTargets(
-    const Fragment::charges_t &charges,
-    const elementcounts_t &elementcounts
-    )
-{
-  elementtargets_t elementtargets;
-  for (elementcounts_t::const_iterator countiter = elementcounts.begin();
-      countiter != elementcounts.end();
-      ++countiter) {
-    chargeiter_t chargeiter = charges.begin();
-    const element_t &element = countiter->first;
-    const count_t &count = countiter->second;
-    for (count_t i = 0; i < count; ++i) {
-      chargeiter_t tempiter = std::find(chargeiter, charges.end(), element);
-      if (tempiter != charges.end()) {
-        // try to insert new list
-        std::pair< elementtargets_t::iterator, bool> inserter =
-          elementtargets.insert( std::make_pair( countiter->first, chargeiters_t(1, tempiter)) );
-        // if already present, append to it
-        if (!inserter.second) {
-          inserter.first->second.push_back(tempiter);
-        } else { // if created, increase vector's reserve to known size
-          inserter.first->second.reserve(countiter->second);
-        }
-        // search from this element onwards then
-        chargeiter = ++tempiter;
-      } else {
-        ELOG(1, "Could not find desired number " << count << " of element "
-            << element << " in fragment with " << charges << ".");
-        return Extractors::elementtargets_t();
-      }
-    }
-  }
-  return elementtargets;
-}
-
-Extractors::elementtargets_t
-Extractors::_detail::convertChargesToTargetMap(
-    const Fragment::charges_t& charges,
-    Fragment::charges_t elements
-    )
-{
-  // place each charge into a map
-  elementtargets_t completeelementtargets;
-  for (chargeiter_t chargeiter = charges.begin();
-      chargeiter != charges.end();
-      ++chargeiter) {
-    std::pair< elementtargets_t::iterator, bool> inserter =
-        completeelementtargets.insert( std::make_pair( *chargeiter, chargeiters_t(1, chargeiter)) );
-    // if already present, append to it
-    if (!inserter.second) {
-      inserter.first->second.push_back(chargeiter);
-    }
-  }
-  // pick out desired charges only
-  std::sort(elements.begin(), elements.end());
-  Fragment::charges_t::iterator eraseiter =
-      std::unique(elements.begin(), elements.end());
-  elements.erase(eraseiter, elements.end());
-  elementtargets_t elementtargets;
-  for(Fragment::charges_t::const_iterator iter = elements.begin();
-      iter != elements.end();
-      ++iter) {
-    elementtargets_t::const_iterator finditer = completeelementtargets.find(*iter);
-    ASSERT( finditer != completeelementtargets.end(),
-        "Extractors::_detail::convertChargesToTargetMap() - no element "+toString(*iter)+" present?");
-    std::pair< elementtargets_t::iterator, bool> inserter =
-        elementtargets.insert( std::make_pair( finditer->first, finditer->second) );
-    ASSERT( inserter.second,
-        "Extractors::_detail::convertChargesToTargetMap() - key twice?");
-  }
-  return elementtargets;
-}
-
-
-Extractors::chargeiters_t 
-Extractors::_detail::realignElementtargets(
-    const elementtargets_t &elementtargets,
-    const Fragment::charges_t elements,
-    const elementcounts_t &elementcounts
-    )
-{
-  chargeiters_t targets;
-  elementcounts_t counts; // how many chargeiters of this element have been used
-  if (!elements.empty()) {  // skip if no elements given
-    targets.reserve(elements.size());
-    for (Fragment::charges_t::const_iterator elementiter = elements.begin();
-        elementiter != elements.end(); ++elementiter) {
-      const element_t &element = *elementiter;
-      count_t &count = counts[element]; // if not present, std::map creates instances with default of 0
-#ifndef NDEBUG
-      {
-        elementcounts_t::const_iterator testiter = elementcounts.find(element);
-        ASSERT( (testiter != elementcounts.end()) && (count < testiter->second),
-            "Extractors::_detail::realignElementTargets() - we want to use more chargeiters for element "
-            +toString(element)+" than we counted initially.");
-      }
-#endif
-      elementtargets_t::const_iterator targetiter = elementtargets.find(element);
-      if (targetiter != elementtargets.end()) {
-        const chargeiters_t &chargeiters = targetiter->second;
-        const chargeiter_t &chargeiter = chargeiters[count++];
-        targets.push_back(chargeiter);
-      }
-    }
-  }
-  return targets;
-}
-
-FunctionModel::arguments_t
-Extractors::gatherAllDistancesFromFragment(
-    const Fragment::positions_t& positions,
-    const Fragment::charges_t& charges,
-    const Fragment::charges_t elements,
-    const size_t globalid
-    )
-{
-  /// The main problem here is that we have to know how many same
-  /// elements (but different atoms!) we are required to find. Hence,
-  /// we first have to count same elements, then get different targets
-  /// for each and then associated them in correct order back again.
-
-  // 0. if no elements given, we return empty arguments
-  if (elements.empty())
-    return FunctionModel::arguments_t();
-
-  // 1. we have to place each charge into a map as unique chargeiter, i.e. map
-  elementtargets_t elementtargets =
-      Extractors::_detail::convertChargesToTargetMap(
-          charges,
-          elements);
-
-  // 2. now we have to combine elementcounts out of elementtargets per desired element
-  //    in a combinatorial fashion
-  targets_per_combination_t combinations =
-      Extractors::_detail::CombineChargesAndTargets(
-          elements,
-          elementtargets);
-
-  // 3. finally, convert chargeiters into argument list
-  FunctionModel::arguments_t args =
-      Extractors::_detail::convertTargetsToArguments(
-          positions,
-          charges,
-          combinations,
-          globalid);
-
-  return args;
-}
-
-Extractors::targets_per_combination_t
-Extractors::_detail::CombineChargesAndTargets(
-    const Fragment::charges_t& elements,
-    const elementtargets_t& elementtargets
-    )
-{
-  // recursively create all correct combinations of targets
-  targets_per_combination_t combinations;
-  chargeiters_t currenttargets;
-  boost::function<void (const chargeiters_t &currenttargets)> addFunction =
-      boost::bind(&targets_per_combination_t::push_back,
-          boost::ref(combinations),
-          _1);
-  pickLastElementAsTarget(elements, elementtargets, currenttargets, addFunction);
-
-  return combinations;
-}
-
-const Fragment::position_t& getPositionToChargeIter(
-    const Fragment::positions_t& positions,
-    const Fragment::charges_t& charges,
-    const Extractors::chargeiter_t &iter
-    )
-{
-  Fragment::positions_t::const_iterator positer = positions.begin();
-  std::advance(positer, std::distance(charges.begin(), iter));
-  const Fragment::position_t &position = *positer;
-  return position;
-}
-
-
-FunctionModel::arguments_t
-Extractors::_detail::convertTargetsToArguments(
-    const Fragment::positions_t& positions,
-    const Fragment::charges_t& charges,
-    const targets_per_combination_t combinations,
-    const size_t globalid
-    )
-{
-  FunctionModel::arguments_t args;
-  // create arguments from each combination. We cannot use
-  // gatherallSymmetricDistanceArguments() because it would not create the
-  // correct indices.
-  for (targets_per_combination_t::const_iterator iter = combinations.begin();
-      iter != combinations.end();
-      ++iter) {
-    for(chargeiters_t::const_iterator firstiter = iter->begin();
-        firstiter != iter->end();
-        ++firstiter) {
-      const Fragment::position_t &firstpos =
-          getPositionToChargeIter(positions, charges, *firstiter);
-      const Vector firsttemp(firstpos[0],firstpos[1],firstpos[2]);
-      for(chargeiters_t::const_iterator seconditer = firstiter;
-          seconditer != iter->end();
-          ++seconditer) {
-        if (firstiter == seconditer)
-          continue;
-        const Fragment::position_t &secondpos =
-            getPositionToChargeIter(positions, charges, *seconditer);
-        const Vector secondtemp(secondpos[0],secondpos[1],secondpos[2]);
-        argument_t arg;
-        arg.distance = firsttemp.distance(secondtemp);
-        arg.indices.first = std::distance(charges.begin(), *firstiter);
-        arg.indices.second = std::distance(charges.begin(), *seconditer);
-        arg.types.first = **firstiter;
-        arg.types.second = **seconditer;
-        args.push_back( arg );
-      }
-    }
-  }
-
-  return args;
-}
-
-void
-Extractors::_detail::pickLastElementAsTarget(
-    Fragment::charges_t elements,
-    elementtargets_t elementtargets,
-    chargeiters_t &currenttargets,
-    boost::function<void (const chargeiters_t &currenttargets)> &addFunction
-    )
-{
-  // get last element from charges
-  ASSERT( !elements.empty(),
-      "Extractors::_detail::pickLastElementAsTarget() - no elements given to pick targets for.");
-  const Fragment::charge_t charge = elements.back();
-  elements.pop_back();
-  elementtargets_t::iterator iter = elementtargets.find(charge);
-  if (iter == elementtargets.end())
-    return;
-  bool NotEmpty = !iter->second.empty();
-  while (NotEmpty) {
-    // get last target from the vector of chargeiters
-    chargeiter_t target = iter->second.back();
-    iter->second.pop_back();
-    // remove this key if empty
-    if (iter->second.empty()) {
-      elementtargets.erase(iter);
-      NotEmpty = false;
-    }
-    currenttargets.push_back(target);
-    if (elements.empty()) {
-      // call add function
-      {
-        std::stringstream targetstream;
-        BOOST_FOREACH( chargeiter_t target, currenttargets ) {
-          targetstream << " " << *target;
-        }
-        LOG(3, "DEBUG: Adding set" << targetstream.str() << ".");
-      }
-      addFunction(currenttargets);
-    } else {
-      // if not, call us recursively
-      pickLastElementAsTarget(elements, elementtargets, currenttargets, addFunction);
-    }
-    // pop last in currenset again
-    currenttargets.pop_back();
-  }
-}
-
-Extractors::chargeiters_t
-Extractors::_detail::gatherTargetsFromFragment(
-    const Fragment::charges_t& charges,
-    const Fragment::charges_t elements
-    )
-{
-  /// The main problem here is that we have to know how many same
-  /// elements (but different atoms!) we are required to find. Hence,
-  /// we first have to count same elements, then get different targets
-  /// for each and then associated them in correct order back again.
-
-  // 1. we have to make elements unique with counts, hence convert to map
-  elementcounts_t elementcounts =
-      Extractors::_detail::getElementCounts(elements);
-
-  // 2. then for each element we need as many targets (chargeiters) as counts
-  elementtargets_t elementtargets =
-      Extractors::_detail::convertElementcountsToTargets(charges, elementcounts);
-
-  // 3. we go again through elements and use one found target for each count
-  // in that order
-  chargeiters_t targets =
-      Extractors::_detail::realignElementtargets(elementtargets, elements, elementcounts);
-
-#ifndef NDEBUG
-  // check all for debugging
-  for (chargeiters_t::const_iterator chargeiter = targets.begin();
-      chargeiter != targets.end();
-      ++chargeiter)
-    ASSERT( *chargeiter != charges.end(),
-        "Extractors::gatherTargetsFromFragment() - we have not found enough targets?!");
-#endif
-
-  return targets;
-}
-
-Fragment::positions_t
-Extractors::gatherPositionsFromFragment(
-    const Fragment::positions_t positions,
-    const Fragment::charges_t charges,
-    const Fragment::charges_t& elements
-    )
-{
-  // 1.-3. gather correct charge positions
-  chargeiters_t targets =
-      Extractors::_detail::gatherTargetsFromFragment(charges, elements);
-  // 4. convert position_t to Vector
-  return Extractors::_detail::gatherPositionsFromTargets(
-          positions,
-          charges,
-          targets);
-}
-
-FunctionModel::arguments_t
-Extractors::gatherDistancesFromFragment(
-    const Fragment::positions_t positions,
-    const Fragment::charges_t charges,
-    const Fragment::charges_t& elements,
-    const size_t globalid
-    )
-{
-  // 1.-3. gather correct charge positions
-  chargeiters_t targets =
-      Extractors::_detail::gatherTargetsFromFragment(charges, elements);
-  // 4. convert position_t to Vector
-  return Extractors::_detail::gatherDistancesFromTargets(
-          positions,
-          charges,
-          targets,
-          globalid);
-}
-
-FunctionModel::list_of_arguments_t Extractors::reorderArgumentsByIncreasingDistance(
-    const FunctionModel::list_of_arguments_t &listargs
-    )
-{
-  FunctionModel::list_of_arguments_t returnargs;
-  for (FunctionModel::list_of_arguments_t::const_iterator iter = listargs.begin();
-      iter != listargs.end(); ++iter) {
-    const FunctionModel::arguments_t &args = *iter;
-    FunctionModel::arguments_t sortedargs(args);
-    std::sort(sortedargs.begin(), sortedargs.end(), argument_t::DistanceComparator);
-    returnargs.push_back(sortedargs);
-  }
-  return returnargs;
-}
-
 
 struct ParticleTypesComparator {
Index: src/FunctionApproximation/Extractors.hpp
===================================================================
--- src/FunctionApproximation/Extractors.hpp	(revision 16c6f7843f246e0e7ac0521b380137a10e710076)
+++ src/FunctionApproximation/Extractors.hpp	(revision e47ac71b3e565b9051aaee9368699525a439737e)
@@ -52,36 +52,4 @@
    */
   namespace _detail {
-    /** Gather all distance arguments from the same aligned vector of charges.
-     *
-     * Basically, we filter the positions indicated by the targets but
-     * from a different vector that has the same layout.
-     *
-     * \param positions all nuclei positions
-     * \param charges all nuclei charges
-     * \param targets iterators on charges
-     * \return filtered distance arguments
-     */
-    FunctionModel::arguments_t gatherDistancesFromTargets(
-        const Fragment::positions_t& positions,
-        const Fragment::charges_t& charges,
-        const chargeiters_t &targets,
-        const size_t globalid
-        );
-
-    /** Gather all positions from the same aligned vector of charges.
-     *
-     * Basically, we filter the positions indicated by the targets but
-     * from a different vector that has the same layout.
-     *
-     * \param positions all nuclei positions
-     * \param charges all nuclei charges
-     * \param targets iterators on charges
-     * \return filtered positions
-     */
-    Fragment::positions_t gatherPositionsFromTargets(
-        const Fragment::positions_t& positions,
-        const Fragment::charges_t& charges,
-        const chargeiters_t& targets
-        );
 
     /** Counts all same elements in the vector and places into map of elements.
@@ -94,114 +62,5 @@
         );
 
-    /** Gather iterators to the elements related to the desired elementcounts.
-     *
-     * \param charges charges wherein to search for the elements
-     * \param elementcounts number of desired hits per element
-     * \return iterators equal to the initial vector of elements
-     */
-    elementtargets_t convertElementcountsToTargets(
-        const Fragment::charges_t &charges,
-        const elementcounts_t &elementcounts
-        );
-
-    /** Convert the alignment back to as it was in the original vector.
-     *
-     * We lost the information by storing it in a map. Hence, we need this
-     * final step.
-     *
-     * \param elementtargets targets as they are in the map \a elementcounts
-     * \param elements the original order of the elements
-     * \param elementcounts the count per element for debugging checks
-     * \return vector of targets in the order as they are in \a element
-     */
-    chargeiters_t realignElementtargets(
-        const elementtargets_t &elementtargets,
-        const Fragment::charges_t elements,
-        const elementcounts_t &elementcounts
-        );
-
-    /** Searches for desired elements in charges in a unique manner.
-     *
-     * The idea is to have e.g. a fragment with charges 8,1,1,2 and
-     * elements as 1,8,1 (e.g. for an angle HOH) and we get the
-     * chargeiters in the desired manner on indices: 1,0,3.
-     *
-     * \param charges charges to look through
-     * \param elements vector of elements to find
-     */
-    chargeiters_t
-    gatherTargetsFromFragment(
-        const Fragment::charges_t& charges,
-        const Fragment::charges_t elements
-        );
-
-    /** Brings all charges together in a map.
-     *
-     * @param charges charges as possible keys and their iterators as values in the map
-     * @param elements list of charges to pick as keys
-     * @return map of key and a vector of charge iterators
-     */
-    elementtargets_t convertChargesToTargetMap(
-        const Fragment::charges_t& charges,
-        Fragment::charges_t elements
-        );
-
-    /** Brings combinatorially together desired list of \a charges and \a targets.
-     *
-     * @param charges list of desired charges
-     * @param elementtargets map of available targets per element
-     * @return vector of chargeiters with all unique combinations
-     */
-    targets_per_combination_t
-    CombineChargesAndTargets(
-        const Fragment::charges_t& charges,
-        const elementtargets_t& elementtargets
-        );
-
-    /** Recursive function to pick the next target.
-     *
-     * This is used by \sa CombineChargesAndTargets()
-     *
-     * @param charges set of charges, reduced by one per recursion
-     * @param elementtargets targets, map of targets to pick from
-     * @param currenttargets current set of targets, "global" through recursion
-     * @param addFunction bound function to add a set when complete
-     */
-    void pickLastElementAsTarget(
-        Fragment::charges_t elements,
-        elementtargets_t elementtargets,
-        chargeiters_t& currenttargets,
-        boost::function<void (const chargeiters_t &currenttargets)> &addFunction
-        );
-
-    /** Converts a list of chargeiters to a list of respective arguments.
-     *
-     * @param positions positions from fragment
-     * @param charges charges associated to each element in \a positions
-     * @param combinations vector of chargeiters
-     * \param globalid refers to the index within the global set of configurations
-     * @return list of arguments
-     */
-    FunctionModel::arguments_t
-    convertTargetsToArguments(
-        const Fragment::positions_t& positions,
-        const Fragment::charges_t& charges,
-        const targets_per_combination_t combinations,
-        const size_t globalid
-        );
   }
-
-  /** Gather all distances from a given set of positions.
-   *
-   * \param positions all nuclei positions
-   * \param charges all nuclei charges
-   * \param globalid index to associated in argument_t with
-   * \return vector of argument_ , each with a distance
-   */
-  FunctionModel::arguments_t
-  gatherAllDistanceArguments(
-      const Fragment::positions_t& positions,
-      const Fragment::charges_t& charges,
-      const size_t globalid);
 
   /** Gather all distances from a given set of positions.
@@ -219,20 +78,4 @@
       const Fragment::charges_t& charges,
       const size_t globalid);
-
-  /** Simple extractor of all unique pair distances of a given \a fragment.
-   *
-   * \param positions all nuclei positions
-   * \param charges all nuclei charges
-   * \param index index refers to the index within the global set of configurations
-   * \return vector of of argument_t containing all found distances
-   */
-  inline FunctionModel::arguments_t gatherAllDistances(
-      const Fragment::positions_t& positions,
-      const Fragment::charges_t& charges,
-      const size_t index
-      ) {
-    // get distance out of Fragment
-    return gatherAllDistanceArguments(positions, charges, index);
-  }
 
   /** Simple extractor of all unique pair distances of a given \a fragment, where
@@ -252,62 +95,4 @@
     return gatherAllSymmetricDistanceArguments(positions, charges, index);
   }
-
-  /** Filters only those positions out of given \a fragment that match \a elements.
-   *
-   * \param positions all nuclei positions
-   * \param charges all nuclei charges
-   * \param elements tuple of desired elements
-   * \return vector of positions_t containing
-   */
-  Fragment::positions_t gatherPositionsFromFragment(
-      const Fragment::positions_t positions,
-      const Fragment::charges_t charges,
-      const Fragment::charges_t& elements
-      );
-
-  /** Filters only those distances out of given \a fragment that match \a elements.
-   *
-   * \param positions all nuclei positions
-   * \param charges all nuclei charges
-   * \param elements tuple of desired elements
-   * \param globalid refers to the index within the global set of configurations
-   * \return vector of arguments_t containing those matched with elements
-   */
-  FunctionModel::arguments_t gatherDistancesFromFragment(
-      const Fragment::positions_t positions,
-      const Fragment::charges_t charges,
-      const Fragment::charges_t& elements,
-      const size_t globalid
-      );
-
-  /** Gather all combinations of charges as distance arguments from the fragment.
-   *
-   * E.g. we have a water fragment, i.e. (8,1,1) and we we want elements (8,1),
-   * then two arguments are returned, first to second and first to third.
-   *
-   * With \sa gatherDistancesFromFragment() only the first distance would be
-   * returned.
-   *
-   * @param positions positions in fragment
-   * @param charges charges in fragment
-   * @param elements list of desired elements
-   * @param globalid some global id to discern training data tuples
-   * @return list of arguments with distances
-   */
-  FunctionModel::arguments_t gatherAllDistancesFromFragment(
-      const Fragment::positions_t& positions,
-      const Fragment::charges_t& charges,
-      const Fragment::charges_t elements,
-      const size_t globalid
-      );
-
-  /** Reorder arguments by increasing distance.
-   *
-   * \param listargs list of arguments to reorder each
-   * \return reordered args
-   */
-  FunctionModel::list_of_arguments_t reorderArgumentsByIncreasingDistance(
-      const FunctionModel::list_of_arguments_t &listargs
-      );
 
   /** Reorder the arguments to bring adjacent ones together.
Index: src/FunctionApproximation/unittests/ExtractorsUnitTest.cpp
===================================================================
--- src/FunctionApproximation/unittests/ExtractorsUnitTest.cpp	(revision 16c6f7843f246e0e7ac0521b380137a10e710076)
+++ src/FunctionApproximation/unittests/ExtractorsUnitTest.cpp	(revision e47ac71b3e565b9051aaee9368699525a439737e)
@@ -72,7 +72,7 @@
 }
 
-/** UnitTest for gatherAllDistanceArguments()
+/** UnitTest for gatherAllSymmetricDistances()
  */
-void ExtractorsTest::gatherAllDistanceArgumentsTest()
+void ExtractorsTest::gatherAllSymmetricDistancesTest()
 {
   // create positions
@@ -90,106 +90,9 @@
   // create distances
   FunctionModel::arguments_t args =
-      Extractors::gatherAllDistanceArguments(positions, charges, 0);
-  CPPUNIT_ASSERT_EQUAL( (size_t)(5*4), args.size() );
+      Extractors::gatherAllSymmetricDistances(positions, charges, 0);
+  CPPUNIT_ASSERT_EQUAL( (size_t)(5*4/2), args.size() );
 
   // check created args
-  for (size_t i=0; i< 5*4; ++i)
+  for (size_t i=0; i< (5*4)/2; ++i)
     CPPUNIT_ASSERT( (args[i].distance >= 0) && (args[i].distance <= 4));
 }
-
-/** UnitTest for gatherPositionsFromFragment()
- */
-void ExtractorsTest::gatherPositionsFromFragmentTest()
-{
-  // create positions
-  Fragment::positions_t positions;
-  Fragment::position_t pos(3, 0.);
-  for (double i = 0; i < 5; i+=1.) {
-    pos[0] = i;
-    positions.push_back(pos);
-  }
-
-  // create charges
-  Fragment::charges_t charges;
-  charges += 6., 6., 1., 1., 1.;
-
-  {
-    // extract carbon pairs
-    Fragment::charges_t carbonpair;
-    carbonpair += 6.,6.;
-    Fragment::positions_t filtered_positions =
-        Extractors::gatherPositionsFromFragment(positions, charges, carbonpair);
-    CPPUNIT_ASSERT_EQUAL( (size_t)2, filtered_positions.size() );
-  }
-
-  {
-    // extract hydrogen triple
-    Fragment::charges_t hydrogentriple;
-    hydrogentriple += 1.,1.,1.;
-    Fragment::positions_t filtered_positions =
-        Extractors::gatherPositionsFromFragment(positions, charges, hydrogentriple);
-    CPPUNIT_ASSERT_EQUAL( (size_t)3, filtered_positions.size() );
-  }
-}
-
-/** UnitTest for gatherDistancesFromFragment()
- */
-void ExtractorsTest::gatherDistancesFromFragmentTest()
-{
-  // create positions
-  Fragment::positions_t positions;
-  Fragment::position_t pos(3, 0.);
-  for (double i = 0; i < 5; i+=1.) {
-    pos[0] = i;
-    positions.push_back(pos);
-  }
-
-  // create charges
-  Fragment::charges_t charges;
-  charges += 6., 6., 1., 1., 1.;
-
-  {
-    // extract carbon pairs
-    Fragment::charges_t carbonpair;
-    carbonpair += 6.,6.;
-    FunctionModel::arguments_t args =
-        Extractors::gatherDistancesFromFragment(positions, charges, carbonpair, 0);
-    CPPUNIT_ASSERT_EQUAL( (size_t)1, args.size() );
-  }
-
-  {
-    // extract hydrogen triple
-    Fragment::charges_t hydrogentriple;
-    hydrogentriple += 1.,1.,1.;
-    FunctionModel::arguments_t args =
-        Extractors::gatherDistancesFromFragment(positions, charges, hydrogentriple, 0);
-    CPPUNIT_ASSERT_EQUAL( (size_t)3, args.size() );
-  }
-}
-
-/** UnitTest for reorderArgumentsByIncreasingDistance()
- */
-void ExtractorsTest::reorderArgumentsByIncreasingDistanceTest()
-{
-  // prepare some arguments
-  FunctionModel::arguments_t args;
-  argument_t arg;
-  arg.distance = 0.1;
-  args.push_back(arg);
-  arg.distance = 0.9;
-  args.push_back(arg);
-  arg.distance = 0.3;
-  args.push_back(arg);
-  CPPUNIT_ASSERT_EQUAL( (size_t)3, args.size() );
-  FunctionModel::list_of_arguments_t listargs(1, args);
-
-  // reorder
-  FunctionModel::list_of_arguments_t listargs_sorted =
-      Extractors::reorderArgumentsByIncreasingDistance(listargs);
-  CPPUNIT_ASSERT_EQUAL( (size_t)1, listargs_sorted.size() );
-  FunctionModel::arguments_t args_sorted = *(listargs_sorted.begin());
-  CPPUNIT_ASSERT_EQUAL( (size_t)3, args_sorted.size() );
-  CPPUNIT_ASSERT_EQUAL( args[0].distance, args_sorted[0].distance );
-  CPPUNIT_ASSERT_EQUAL( args[1].distance, args_sorted[2].distance );
-  CPPUNIT_ASSERT_EQUAL( args[2].distance, args_sorted[1].distance );
-}
Index: src/FunctionApproximation/unittests/ExtractorsUnitTest.hpp
===================================================================
--- src/FunctionApproximation/unittests/ExtractorsUnitTest.hpp	(revision 16c6f7843f246e0e7ac0521b380137a10e710076)
+++ src/FunctionApproximation/unittests/ExtractorsUnitTest.hpp	(revision e47ac71b3e565b9051aaee9368699525a439737e)
@@ -22,8 +22,5 @@
 {
     CPPUNIT_TEST_SUITE( ExtractorsTest) ;
-    CPPUNIT_TEST ( gatherAllDistanceArgumentsTest );
-    CPPUNIT_TEST ( reorderArgumentsByIncreasingDistanceTest );
-    CPPUNIT_TEST ( gatherPositionsFromFragmentTest );
-    CPPUNIT_TEST ( gatherDistancesFromFragmentTest );
+    CPPUNIT_TEST ( gatherAllSymmetricDistancesTest );
     CPPUNIT_TEST_SUITE_END();
 
@@ -31,8 +28,5 @@
       void setUp();
       void tearDown();
-      void gatherAllDistanceArgumentsTest();
-      void reorderArgumentsByIncreasingDistanceTest();
-      void gatherPositionsFromFragmentTest();
-      void gatherDistancesFromFragmentTest();
+      void gatherAllSymmetricDistancesTest();
 
 private:
