remove Potentials.cpp

release/4.3a0
Fan Jiang 2022-01-06 20:12:10 -05:00
parent f65bd4d90d
commit f7f208e0f5
1 changed files with 0 additions and 96 deletions

View File

@ -1,96 +0,0 @@
///* ----------------------------------------------------------------------------
//
// * GTSAM Copyright 2010, Georgia Tech Research Corporation,
// * Atlanta, Georgia 30332-0415
// * All Rights Reserved
// * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
//
// * See LICENSE for the license information
//
// * -------------------------------------------------------------------------- */
//
///**
// * @file Potentials.cpp
// * @date March 24, 2011
// * @author Frank Dellaert
// */
//
//#include <gtsam/discrete/DecisionTree-inl.h>
//#include <gtsam/discrete/Potentials.h>
//
//#include <boost/format.hpp>
//
//#include <string>
//
//using namespace std;
//
//namespace gtsam {
//
///* ************************************************************************* */
//double Potentials::safe_div(const double& a, const double& b) {
// // cout << boost::format("%g / %g = %g\n") % a % b % ((a == 0) ? 0 : (a / b));
// // The use for safe_div is when we divide the product factor by the sum
// // factor. If the product or sum is zero, we accord zero probability to the
// // event.
// return (a == 0 || b == 0) ? 0 : (a / b);
//}
//
///* ********************************************************************************
// */
//Potentials::Potentials() : ADT(1.0) {}
//
///* ********************************************************************************
// */
//Potentials::Potentials(const DiscreteKeys& keys, const ADT& decisionTree)
// : ADT(decisionTree), cardinalities_(keys.cardinalities()) {}
//
///* ************************************************************************* */
//bool Potentials::equals(const Potentials& other, double tol) const {
// return ADT::equals(other, tol);
//}
//
///* ************************************************************************* */
//void Potentials::print(const string& s, const KeyFormatter& formatter) const {
// cout << s << "\n Cardinalities: { ";
// for (const std::pair<const Key,size_t>& key : cardinalities_)
// cout << formatter(key.first) << ":" << key.second << ", ";
// cout << "}" << endl;
// ADT::print(" ", formatter);
//}
////
//// /* ************************************************************************* */
//// template<class P>
//// void Potentials::remapIndices(const P& remapping) {
//// // Permute the _cardinalities (TODO: Inefficient Consider Improving)
//// DiscreteKeys keys;
//// map<Key, Key> ordering;
////
//// // Get the original keys from cardinalities_
//// for(const DiscreteKey& key: cardinalities_)
//// keys & key;
////
//// // Perform Permutation
//// for(DiscreteKey& key: keys) {
//// ordering[key.first] = remapping[key.first];
//// key.first = ordering[key.first];
//// }
////
//// // Change *this
//// AlgebraicDecisionTree<Key> permuted((*this), ordering);
//// *this = permuted;
//// cardinalities_ = keys.cardinalities();
//// }
////
//// /* ************************************************************************* */
//// void Potentials::permuteWithInverse(const Permutation& inversePermutation) {
//// remapIndices(inversePermutation);
//// }
////
//// /* ************************************************************************* */
//// void Potentials::reduceWithInverse(const internal::Reduction& inverseReduction) {
//// remapIndices(inverseReduction);
//// }
//
// /* ************************************************************************* */
//
//} // namespace gtsam