mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Cleanup: C++11 doesn't require a space between angle brackets
Change-Id: Id0777cf3deac94395bd63aee40b49375dff3e35a
This commit is contained in:
parent
c4f6fc1e48
commit
0b1fa0c1c7
@ -215,13 +215,13 @@ class ProximityInfoState {
|
||||
std::vector<float> mSpeedRates;
|
||||
std::vector<float> mDirections;
|
||||
// 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
|
||||
// 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
|
||||
// inputs including the current input point.
|
||||
std::vector<ProximityInfoStateUtils::NearKeycodesSet> mSampledSearchKeySets;
|
||||
std::vector<std::vector<int> > mSampledSearchKeyVectors;
|
||||
std::vector<std::vector<int>> mSampledSearchKeyVectors;
|
||||
bool mTouchPositionCorrectionEnabled;
|
||||
int mInputProximities[MAX_PROXIMITY_CHARS_SIZE * MAX_WORD_LENGTH];
|
||||
int mSampledInputSize;
|
||||
|
@ -621,7 +621,7 @@ namespace latinime {
|
||||
const std::vector<int> *const sampledLengthCache,
|
||||
const std::vector<float> *const sampledNormalizedSquaredLengthCache,
|
||||
const ProximityInfo *const proximityInfo,
|
||||
std::vector<std::unordered_map<int, float> > *charProbabilities) {
|
||||
std::vector<std::unordered_map<int, float>> *charProbabilities) {
|
||||
charProbabilities->resize(sampledInputSize);
|
||||
// Calculates probabilities of using a point as a correlated point with the character
|
||||
// for each point.
|
||||
@ -822,9 +822,9 @@ namespace latinime {
|
||||
/* static */ void ProximityInfoStateUtils::updateSampledSearchKeySets(
|
||||
const ProximityInfo *const proximityInfo, const int sampledInputSize,
|
||||
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<std::vector<int> > *sampledSearchKeyVectors) {
|
||||
std::vector<std::vector<int>> *sampledSearchKeyVectors) {
|
||||
sampledSearchKeySets->resize(sampledInputSize);
|
||||
sampledSearchKeyVectors->resize(sampledInputSize);
|
||||
const int readForwordLength = static_cast<int>(
|
||||
@ -868,7 +868,7 @@ namespace latinime {
|
||||
/* static */ bool ProximityInfoStateUtils::suppressCharProbabilities(const int mostCommonKeyWidth,
|
||||
const int sampledInputSize, const std::vector<int> *const lengthCache,
|
||||
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 <= index1 && index1 < sampledInputSize);
|
||||
const float keyWidthFloat = static_cast<float>(mostCommonKeyWidth);
|
||||
@ -933,7 +933,7 @@ namespace latinime {
|
||||
// returns probability of generating the word.
|
||||
/* static */ float ProximityInfoStateUtils::getMostProbableString(
|
||||
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) {
|
||||
ASSERT(sampledInputSize >= 0);
|
||||
memset(codePointBuf, 0, sizeof(codePointBuf[0]) * MAX_WORD_LENGTH);
|
||||
|
@ -72,13 +72,13 @@ class ProximityInfoStateUtils {
|
||||
const std::vector<int> *const sampledLengthCache,
|
||||
const std::vector<float> *const sampledNormalizedSquaredLengthCache,
|
||||
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,
|
||||
const int sampledInputSize, 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<std::vector<int> > *sampledSearchKeyVectors);
|
||||
std::vector<std::vector<int>> *sampledSearchKeyVectors);
|
||||
static float getPointToKeyByIdLength(const float maxPointToKeyLength,
|
||||
const std::vector<float> *const sampledNormalizedSquaredLengthCache, const int keyCount,
|
||||
const int inputIndex, const int keyId);
|
||||
@ -105,7 +105,7 @@ class ProximityInfoStateUtils {
|
||||
// TODO: Move to most_probable_string_utils.h
|
||||
static float getMostProbableString(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);
|
||||
|
||||
private:
|
||||
@ -147,7 +147,7 @@ class ProximityInfoStateUtils {
|
||||
const int index2);
|
||||
static bool suppressCharProbabilities(const int mostCommonKeyWidth,
|
||||
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(
|
||||
const ProximityInfo *const proximityInfo, const std::vector<int> *const sampledInputXs,
|
||||
const std::vector<int> *const sampledInputYs, const int keyIndex,
|
||||
|
@ -30,7 +30,7 @@ namespace latinime {
|
||||
*/
|
||||
class DictionaryHeaderStructurePolicy {
|
||||
public:
|
||||
typedef std::map<std::vector<int>, std::vector<int> > AttributeMap;
|
||||
typedef std::map<std::vector<int>, std::vector<int>> AttributeMap;
|
||||
|
||||
virtual ~DictionaryHeaderStructurePolicy() {}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class ForgettingCurveUtils {
|
||||
static const int STRONG_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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user