diff options
author | Michael Jaumann <meta_dev@yahoo.com> | 2014-09-15 07:16:13 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-09-16 09:16:21 +0000 |
commit | 7d34479c74eddaad90fc491210a7cd6eddcc4286 (patch) | |
tree | e0e5e7ddf3648259c4d8702b219f99af34381b0c /i18npool | |
parent | 9922931ae62accdf70e734fc392125c0ed5d01c2 (diff) |
renamed function names from german to english
Change-Id: I201dc723a22097709858b0a3489ac8a562cfccc2
Reviewed-on: https://gerrit.libreoffice.org/11450
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/search/levdis.cxx | 14 | ||||
-rw-r--r-- | i18npool/source/search/levdis.hxx | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index d23a27826307..7b5fe6e0518e 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -276,10 +276,10 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed ) if ( 0 == (nMid = Mid3( nX, nY, nZ )) ) // even two 0 nLimit = nMax; // either 0 or the only one >0 else // one is 0 - nLimit = KGV( nMid, nMax ); + nLimit = LCM( nMid, nMax ); } else // all three of them are not 0 - nLimit = KGV( KGV( nX, nY ), nZ ); + nLimit = LCM( LCM( nX, nY ), nZ ); nRepP0 = ( nX ? nLimit / nX : nLimit + 1 ); nInsQ0 = ( nY ? nLimit / nY : nLimit + 1 ); nDelR0 = ( nZ ? nLimit / nZ : nLimit + 1 ); @@ -289,7 +289,7 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed ) // greatest common divisior according to Euklid (chaindivision) // special case: 0 plus anything produces 1 -int WLevDistance::GGT( int a, int b ) +int WLevDistance::GCD( int a, int b ) { if ( !a || !b ) return 1; @@ -305,13 +305,13 @@ int WLevDistance::GGT( int a, int b ) return( a ? a : b); } -// least common multiple : a * b / GGT(a,b) -int WLevDistance::KGV( int a, int b ) +// least common multiple : a * b / GCD(a,b) +int WLevDistance::LCM( int a, int b ) { if ( a > b ) // decrease owerflow chance - return( (a / GGT(a,b)) * b ); + return( (a / GCD(a,b)) * b ); else - return( (b / GGT(a,b)) * a ); + return( (b / GCD(a,b)) * a ); } // Minimum of three values diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx index 74d4678838dc..94200af67f19 100644 --- a/i18npool/source/search/levdis.hxx +++ b/i18npool/source/search/levdis.hxx @@ -37,7 +37,7 @@ Wertebereich fuer X,Y,Z ist 0..33 um mit Limit sicher unter 16-bit-signed-int-max zu bleiben, 31*32*33 gibt das Maximum - KGV(31,32,33) == 32736 + LCM(31,32,33) == 32736 */ #define LEVDISDEFAULT_XOTHER 2 @@ -132,8 +132,8 @@ class WLevDistance inline int Min3( int x, int y, int z ); // inline wegen Schleife int Mid3( int x, int y, int z ); int Max3( int x, int y, int z ); - int GGT( int a, int b ); // Groesster Gemeinsamer Teiler - int KGV( int a, int b ); // Kleinstes Gemeinsames Vielfaches + int GCD( int a, int b ); // Groesster Gemeinsamer Teiler + int LCM( int a, int b ); // Kleinstes Gemeinsames Vielfaches public: // CToren mit Userangaben, danach mit GetLimit() Limit holen |