am 026350a1: am e6a9f797: am 0b1fa0c1: Cleanup: C++11 doesn\'t require a space between angle brackets

* commit '026350a179995ef530a38cde3043d813a55129b1':
  Cleanup: C++11 doesn't require a space between angle brackets
This commit is contained in:
Ken Wakasa 2014-07-30 17:17:11 +00:00 committed by Android Git Automerger
commit a4dbe713e0
5 changed files with 14 additions and 14 deletions

View file

@ -215,13 +215,13 @@ class ProximityInfoState {
std::vector<float> mSpeedRates; std::vector<float> mSpeedRates;
std::vector<float> mDirections; std::vector<float> mDirections;
// probabilities of skipping or mapping to a key for each point. // probabilities of skipping or mapping to a key for each point.
std::vector<std::unordered_map<int, float> > mCharProbabilities; std::vector<std::unordered_map<int, float>> mCharProbabilities;
// The vector for the key code set which holds nearby keys of some trailing sampled input points // The vector for the key code set which holds nearby keys of some trailing sampled input points
// for each sampled input point. These nearby keys contain the next characters which can be in // for each sampled input point. These nearby keys contain the next characters which can be in
// the dictionary. Specifically, currently we are looking for keys nearby trailing sampled // the dictionary. Specifically, currently we are looking for keys nearby trailing sampled
// inputs including the current input point. // inputs including the current input point.
std::vector<ProximityInfoStateUtils::NearKeycodesSet> mSampledSearchKeySets; std::vector<ProximityInfoStateUtils::NearKeycodesSet> mSampledSearchKeySets;
std::vector<std::vector<int> > mSampledSearchKeyVectors; std::vector<std::vector<int>> mSampledSearchKeyVectors;
bool mTouchPositionCorrectionEnabled; bool mTouchPositionCorrectionEnabled;
int mInputProximities[MAX_PROXIMITY_CHARS_SIZE * MAX_WORD_LENGTH]; int mInputProximities[MAX_PROXIMITY_CHARS_SIZE * MAX_WORD_LENGTH];
int mSampledInputSize; int mSampledInputSize;

View file

@ -621,7 +621,7 @@ namespace latinime {
const std::vector<int> *const sampledLengthCache, const std::vector<int> *const sampledLengthCache,
const std::vector<float> *const sampledNormalizedSquaredLengthCache, const std::vector<float> *const sampledNormalizedSquaredLengthCache,
const ProximityInfo *const proximityInfo, const ProximityInfo *const proximityInfo,
std::vector<std::unordered_map<int, float> > *charProbabilities) { std::vector<std::unordered_map<int, float>> *charProbabilities) {
charProbabilities->resize(sampledInputSize); charProbabilities->resize(sampledInputSize);
// Calculates probabilities of using a point as a correlated point with the character // Calculates probabilities of using a point as a correlated point with the character
// for each point. // for each point.
@ -822,9 +822,9 @@ namespace latinime {
/* static */ void ProximityInfoStateUtils::updateSampledSearchKeySets( /* static */ void ProximityInfoStateUtils::updateSampledSearchKeySets(
const ProximityInfo *const proximityInfo, const int sampledInputSize, const ProximityInfo *const proximityInfo, const int sampledInputSize,
const int lastSavedInputSize, const std::vector<int> *const sampledLengthCache, const int lastSavedInputSize, const std::vector<int> *const sampledLengthCache,
const std::vector<std::unordered_map<int, float> > *const charProbabilities, const std::vector<std::unordered_map<int, float>> *const charProbabilities,
std::vector<NearKeycodesSet> *sampledSearchKeySets, std::vector<NearKeycodesSet> *sampledSearchKeySets,
std::vector<std::vector<int> > *sampledSearchKeyVectors) { std::vector<std::vector<int>> *sampledSearchKeyVectors) {
sampledSearchKeySets->resize(sampledInputSize); sampledSearchKeySets->resize(sampledInputSize);
sampledSearchKeyVectors->resize(sampledInputSize); sampledSearchKeyVectors->resize(sampledInputSize);
const int readForwordLength = static_cast<int>( const int readForwordLength = static_cast<int>(
@ -868,7 +868,7 @@ namespace latinime {
/* static */ bool ProximityInfoStateUtils::suppressCharProbabilities(const int mostCommonKeyWidth, /* static */ bool ProximityInfoStateUtils::suppressCharProbabilities(const int mostCommonKeyWidth,
const int sampledInputSize, const std::vector<int> *const lengthCache, const int sampledInputSize, const std::vector<int> *const lengthCache,
const int index0, const int index1, const int index0, const int index1,
std::vector<std::unordered_map<int, float> > *charProbabilities) { std::vector<std::unordered_map<int, float>> *charProbabilities) {
ASSERT(0 <= index0 && index0 < sampledInputSize); ASSERT(0 <= index0 && index0 < sampledInputSize);
ASSERT(0 <= index1 && index1 < sampledInputSize); ASSERT(0 <= index1 && index1 < sampledInputSize);
const float keyWidthFloat = static_cast<float>(mostCommonKeyWidth); const float keyWidthFloat = static_cast<float>(mostCommonKeyWidth);
@ -933,7 +933,7 @@ namespace latinime {
// returns probability of generating the word. // returns probability of generating the word.
/* static */ float ProximityInfoStateUtils::getMostProbableString( /* static */ float ProximityInfoStateUtils::getMostProbableString(
const ProximityInfo *const proximityInfo, const int sampledInputSize, const ProximityInfo *const proximityInfo, const int sampledInputSize,
const std::vector<std::unordered_map<int, float> > *const charProbabilities, const std::vector<std::unordered_map<int, float>> *const charProbabilities,
int *const codePointBuf) { int *const codePointBuf) {
ASSERT(sampledInputSize >= 0); ASSERT(sampledInputSize >= 0);
memset(codePointBuf, 0, sizeof(codePointBuf[0]) * MAX_WORD_LENGTH); memset(codePointBuf, 0, sizeof(codePointBuf[0]) * MAX_WORD_LENGTH);

View file

@ -72,13 +72,13 @@ class ProximityInfoStateUtils {
const std::vector<int> *const sampledLengthCache, const std::vector<int> *const sampledLengthCache,
const std::vector<float> *const sampledNormalizedSquaredLengthCache, const std::vector<float> *const sampledNormalizedSquaredLengthCache,
const ProximityInfo *const proximityInfo, const ProximityInfo *const proximityInfo,
std::vector<std::unordered_map<int, float> > *charProbabilities); std::vector<std::unordered_map<int, float>> *charProbabilities);
static void updateSampledSearchKeySets(const ProximityInfo *const proximityInfo, static void updateSampledSearchKeySets(const ProximityInfo *const proximityInfo,
const int sampledInputSize, const int lastSavedInputSize, const int sampledInputSize, const int lastSavedInputSize,
const std::vector<int> *const sampledLengthCache, const std::vector<int> *const sampledLengthCache,
const std::vector<std::unordered_map<int, float> > *const charProbabilities, const std::vector<std::unordered_map<int, float>> *const charProbabilities,
std::vector<NearKeycodesSet> *sampledSearchKeySets, std::vector<NearKeycodesSet> *sampledSearchKeySets,
std::vector<std::vector<int> > *sampledSearchKeyVectors); std::vector<std::vector<int>> *sampledSearchKeyVectors);
static float getPointToKeyByIdLength(const float maxPointToKeyLength, static float getPointToKeyByIdLength(const float maxPointToKeyLength,
const std::vector<float> *const sampledNormalizedSquaredLengthCache, const int keyCount, const std::vector<float> *const sampledNormalizedSquaredLengthCache, const int keyCount,
const int inputIndex, const int keyId); const int inputIndex, const int keyId);
@ -105,7 +105,7 @@ class ProximityInfoStateUtils {
// TODO: Move to most_probable_string_utils.h // TODO: Move to most_probable_string_utils.h
static float getMostProbableString(const ProximityInfo *const proximityInfo, static float getMostProbableString(const ProximityInfo *const proximityInfo,
const int sampledInputSize, const int sampledInputSize,
const std::vector<std::unordered_map<int, float> > *const charProbabilities, const std::vector<std::unordered_map<int, float>> *const charProbabilities,
int *const codePointBuf); int *const codePointBuf);
private: private:
@ -147,7 +147,7 @@ class ProximityInfoStateUtils {
const int index2); const int index2);
static bool suppressCharProbabilities(const int mostCommonKeyWidth, static bool suppressCharProbabilities(const int mostCommonKeyWidth,
const int sampledInputSize, const std::vector<int> *const lengthCache, const int index0, const int sampledInputSize, const std::vector<int> *const lengthCache, const int index0,
const int index1, std::vector<std::unordered_map<int, float> > *charProbabilities); const int index1, std::vector<std::unordered_map<int, float>> *charProbabilities);
static float calculateSquaredDistanceFromSweetSpotCenter( static float calculateSquaredDistanceFromSweetSpotCenter(
const ProximityInfo *const proximityInfo, const std::vector<int> *const sampledInputXs, const ProximityInfo *const proximityInfo, const std::vector<int> *const sampledInputXs,
const std::vector<int> *const sampledInputYs, const int keyIndex, const std::vector<int> *const sampledInputYs, const int keyIndex,

View file

@ -30,7 +30,7 @@ namespace latinime {
*/ */
class DictionaryHeaderStructurePolicy { class DictionaryHeaderStructurePolicy {
public: public:
typedef std::map<std::vector<int>, std::vector<int> > AttributeMap; typedef std::map<std::vector<int>, std::vector<int>> AttributeMap;
virtual ~DictionaryHeaderStructurePolicy() {} virtual ~DictionaryHeaderStructurePolicy() {}

View file

@ -84,7 +84,7 @@ class ForgettingCurveUtils {
static const int STRONG_BASE_PROBABILITY; static const int STRONG_BASE_PROBABILITY;
static const int AGGRESSIVE_BASE_PROBABILITY; static const int AGGRESSIVE_BASE_PROBABILITY;
std::vector<std::vector<std::vector<int> > > mTables; std::vector<std::vector<std::vector<int>>> mTables;
static int getBaseProbabilityForLevel(const int tableId, const int level); static int getBaseProbabilityForLevel(const int tableId, const int level);
}; };