Merge "Move frameworks/ml to libc++."
diff --git a/bordeaux/learning/Android.mk b/bordeaux/learning/Android.mk
index ae10982..e2e3bae 100644
--- a/bordeaux/learning/Android.mk
+++ b/bordeaux/learning/Android.mk
@@ -27,12 +27,8 @@
 
 LOCAL_PRELINK_MODULE := false
 
-LOCAL_CFLAGS := -DANDROID
-
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../native
 
-include external/stlport/libstlport.mk
-
 include $(BUILD_SHARED_LIBRARY)
 
 ##
diff --git a/bordeaux/learning/multiclass_pa/Android.mk b/bordeaux/learning/multiclass_pa/Android.mk
index a925c99..c9e5791 100644
--- a/bordeaux/learning/multiclass_pa/Android.mk
+++ b/bordeaux/learning/multiclass_pa/Android.mk
@@ -29,10 +29,6 @@
 
 LOCAL_PRELINK_MODULE := false
 
-LOCAL_CFLAGS := -DANDROID
-
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../native
 
-include external/stlport/libstlport.mk
-
 include $(BUILD_STATIC_LIBRARY)
diff --git a/bordeaux/learning/multiclass_pa/native/multiclass_pa.cpp b/bordeaux/learning/multiclass_pa/native/multiclass_pa.cpp
index f6e8c7d..9ee12b0 100644
--- a/bordeaux/learning/multiclass_pa/native/multiclass_pa.cpp
+++ b/bordeaux/learning/multiclass_pa/native/multiclass_pa.cpp
@@ -21,6 +21,8 @@
 
 #include "native/multiclass_pa.h"
 
+#include <stdlib.h>
+
 using std::vector;
 using std::pair;
 
diff --git a/bordeaux/learning/stochastic_linear_ranker/Android.mk b/bordeaux/learning/stochastic_linear_ranker/Android.mk
index 540141a..55ab5a4 100644
--- a/bordeaux/learning/stochastic_linear_ranker/Android.mk
+++ b/bordeaux/learning/stochastic_linear_ranker/Android.mk
@@ -30,12 +30,6 @@
 
 LOCAL_PRELINK_MODULE := false
 
-LOCAL_CFLAGS := -DANDROID
-
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../native
 
-include external/stlport/libstlport.mk
-
-# include external/opencv/libopencv.mk
-
 include $(BUILD_STATIC_LIBRARY)
diff --git a/bordeaux/learning/stochastic_linear_ranker/jni/jni_stochastic_linear_ranker.cpp b/bordeaux/learning/stochastic_linear_ranker/jni/jni_stochastic_linear_ranker.cpp
index f653eb9..f54b33e 100644
--- a/bordeaux/learning/stochastic_linear_ranker/jni/jni_stochastic_linear_ranker.cpp
+++ b/bordeaux/learning/stochastic_linear_ranker/jni/jni_stochastic_linear_ranker.cpp
@@ -23,7 +23,7 @@
 #include <string>
 using std::string;
 using std::vector;
-using std::hash_map;
+using std::unordered_map;
 using learning_stochastic_linear::StochasticLinearRanker;
 using learning_stochastic_linear::SparseWeightVector;
 
diff --git a/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.cpp b/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.cpp
index 5423784..52ce118 100644
--- a/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.cpp
+++ b/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.cpp
@@ -392,7 +392,7 @@
   return 0;
 }
 
-template class SparseWeightVector<std::string, std::hash_map<std::string, double> >;
-template class SparseWeightVector<int, std::hash_map<int, double> >;
-template class SparseWeightVector<uint64, std::hash_map<uint64, double> >;
+template class SparseWeightVector<std::string, std::unordered_map<std::string, double> >;
+template class SparseWeightVector<int, std::unordered_map<int, double> >;
+template class SparseWeightVector<uint64, std::unordered_map<uint64, double> >;
 }  // namespace learning_stochastic_linear
diff --git a/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.h b/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.h
index 7bfd3b8..b5f1ff5 100644
--- a/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.h
+++ b/bordeaux/learning/stochastic_linear_ranker/native/sparse_weight_vector.h
@@ -22,17 +22,18 @@
 #ifndef LEARNING_STOCHASTIC_LINEAR_SPARSE_WEIGHT_VECTOR_H_
 #define LEARNING_STOCHASTIC_LINEAR_SPARSE_WEIGHT_VECTOR_H_
 
-#include <hash_map>
-#include <iosfwd>
 #include <math.h>
+
+#include <iosfwd>
 #include <sstream>
 #include <string>
+#include <unordered_map>
 
 #include "common_defs.h"
 
 namespace learning_stochastic_linear {
 
-template<class Key = std::string, class Hash = std::hash_map<Key, double> >
+template<class Key = std::string, class Hash = std::unordered_map<Key, double> >
 class SparseWeightVector {
  public:
   typedef Hash Wmap;
@@ -170,9 +171,9 @@
   Wmap wmax_;
   // Normalizing constant in magnitude measurement.
   double normalizer_;
-  // This function in necessary since by default hash_map inserts an element
-  // if it does not find the key through [] operator. It implements a lookup
-  // without the space overhead of an add.
+  // This function is necessary since by default unordered_map inserts an
+  // element if it does not find the key through [] operator. It implements a
+  // lookup without the space overhead of an add.
   bool GetValue(const Wmap &w1, const Key &fname, double *val) const {
     Witer_const iter = w1.find(fname);
     if (iter != w1.end()) {
diff --git a/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.cpp b/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.cpp
index 9e544b1..db702ad 100644
--- a/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.cpp
+++ b/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.cpp
@@ -132,8 +132,8 @@
   return 0;
 }
 
-template class StochasticLinearRanker<std::string, std::hash_map<std::string, double> >;
-template class StochasticLinearRanker<int, std::hash_map<int, double> >;
-template class StochasticLinearRanker<uint64, std::hash_map<uint64, double> >;
+template class StochasticLinearRanker<std::string, std::unordered_map<std::string, double> >;
+template class StochasticLinearRanker<int, std::unordered_map<int, double> >;
+template class StochasticLinearRanker<uint64, std::unordered_map<uint64, double> >;
 
 }  // namespace learning_stochastic_linear
diff --git a/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.h b/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.h
index cfcc49b..5419a5a 100644
--- a/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.h
+++ b/bordeaux/learning/stochastic_linear_ranker/native/stochastic_linear_ranker.h
@@ -22,11 +22,12 @@
 #ifndef LEARNING_STOCHASTIC_LINEAR_STOCHASTIC_LINEAR_RANKER_H_
 #define LEARNING_STOCHASTIC_LINEAR_STOCHASTIC_LINEAR_RANKER_H_
 
-#include <cmath>
-#include <hash_map>
-#include <string>
-
 #include <sys/types.h>
+
+#include <cmath>
+#include <string>
+#include <unordered_map>
+
 #include "cutils/log.h"
 #include "common_defs.h"
 #include "learning_rate_controller-inl.h"
@@ -37,7 +38,7 @@
 // NOTE: This Stochastic Linear Ranker supports only the following update types:
 // SL: Stochastic Linear
 // CS: Constraint Satisfaction
-template<class Key = std::string, class Hash = std::hash_map<std::string, double> >
+template<class Key = std::string, class Hash = std::unordered_map<std::string, double> >
 class StochasticLinearRanker {
  public:
   // initialize lambda_ and constraint to a meaningful default. Will give