id
stringlengths
24
24
repo
stringlengths
7
59
path
stringlengths
11
234
func_name
stringlengths
3
140
url
stringlengths
102
339
split
stringclasses
3 values
language
stringclasses
1 value
docstring
stringlengths
1
34k
code
stringlengths
63
466k
text
stringlengths
101
467k
token_count
int32
22
125k
doc_chars
int32
1
34k
code_chars
int32
63
466k
license_basis
stringclasses
1 value
source
stringclasses
1 value
added
stringdate
2026-12-05 00:00:00
2026-12-05 00:00:00
record_sha256
stringlengths
64
64
license
stringclasses
18 values
license_class
stringclasses
4 values
license_source
stringlengths
45
101
37066dce7b4f561bba714352
Harium/keel
src/main/java/com/harium/keel/catalano/core/IntPoint.java
IntPoint.Divide
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/core/IntPoint.java#L238-L242
train
java
Divides values of two points. @param point1 IntPoint. @param point2 IntPoint. @return IntPoint that contains X and Y axis coordinate.
public static IntPoint Divide(IntPoint point1, IntPoint point2) { IntPoint result = new IntPoint(point1); result.Divide(point2); return result; }
Divides values of two points. @param point1 IntPoint. @param point2 IntPoint. @return IntPoint that contains X and Y axis coordinate. public static IntPoint Divide(IntPoint point1, IntPoint point2) { IntPoint result = new IntPoint(point1); result.Divide(point2); return result; }
70
134
177
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b12af024edfb1fab2a2dc4224e06fb7986a91beef3f3b422c25acf1567fe8319
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
6e4aeb15fb84679530ac7850
Harium/keel
src/main/java/com/harium/keel/catalano/core/IntPoint.java
IntPoint.DistanceTo
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/core/IntPoint.java#L260-L265
train
java
Calculate Euclidean distance between two points. @param anotherPoint Point to calculate distance to. @return Euclidean distance between this point and anotherPoint points.
public float DistanceTo(IntPoint anotherPoint) { float dx = this.x - anotherPoint.x; float dy = this.y - anotherPoint.y; return (float) Math.sqrt(dx * dx + dy * dy); }
Calculate Euclidean distance between two points. @param anotherPoint Point to calculate distance to. @return Euclidean distance between this point and anotherPoint points. public float DistanceTo(IntPoint anotherPoint) { float dx = this.x - anotherPoint.x; float dy = this.y - anotherPoint.y; ...
78
172
201
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7ebb63b494391e90f7225104bb3a0c8b088bad6c3751d375928ddec77f6b53f0
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
40a56e51332607288ed936c3
Harium/keel
src/main/java/com/harium/keel/catalano/math/decomposition/QRDecomposition.java
QRDecomposition.solve
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/decomposition/QRDecomposition.java#L206-L250
train
java
Least squares solution of A*X = B @param B A Matrix with as many rows as A and any number of columns. @return X that minimizes the two norm of Q*R*X-B. @throws IllegalArgumentException Matrix row dimensions must agree. @throws RuntimeException Matrix is rank deficient.
public double[][] solve(double[][] B) { if (B.length != m) { throw new IllegalArgumentException("Matrix row dimensions must agree."); } if (!this.isFullRank()) { throw new RuntimeException("Matrix is rank deficient."); } // Copy right hand side in...
Least squares solution of A*X = B @param B A Matrix with as many rows as A and any number of columns. @return X that minimizes the two norm of Q*R*X-B. @throws IllegalArgumentException Matrix row dimensions must agree. @throws RuntimeException Matrix is rank deficient. public double[][] solve(double[][] B) { ...
444
278
1,380
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
03f5e2cd85ff684cd21bcf12ad059b9bf03de0a0cef903c1c446280a9becff02
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
c84e40ac840336c7c16e792e
Harium/keel
src/main/java/com/harium/keel/catalano/math/random/Pcg32.java
Pcg32.nextInt
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/random/Pcg32.java#L92-L100
train
java
Returns the next pseudorandom, approximately uniformly distributed {@code int} value from this random number generator's sequence. The general contract of {@code nextInt} is that one {@code int} value is pseudorandomly generated and returned. All 2<font size="-1"><sup>32 </sup></font> possible {@code int} values are pr...
@Override public int nextInt() { long oldState = state; state = oldState * MULTIPLIER + inc; int xorShifted = (int) (((oldState >>> 18) ^ oldState) >>> 27); int rot = (int) (oldState >>> 59); return Integer.rotateRight(xorShifted, rot); }
Returns the next pseudorandom, approximately uniformly distributed {@code int} value from this random number generator's sequence. The general contract of {@code nextInt} is that one {@code int} value is pseudorandomly generated and returned. All 2<font size="-1"><sup>32 </sup></font> possible {@code int} values are pr...
174
399
287
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
13defd5a3024d1ca317da99b4fe2436ed822eb43e85614dffea18cb11016c617
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
4b7881a6815e3f614d71ee41
Harium/keel
src/main/java/com/harium/keel/catalano/math/random/Pcg32.java
Pcg32.nextInt
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/random/Pcg32.java#L108-L121
train
java
Returns the next pseudorandom, approximately uniformly distributed {@code int} value between 0 (inclusive) and {@code n} (exclusive). @see java.util.Random#nextInt(int)
@Override public int nextInt(int n) { if (n <= 0) { throw new IllegalArgumentException("n must be positive"); } // the special treatment of powers of 2 as in Random.nextInt(int) shouldn't be necessary int bits, val; do { bits = nextInt() >>> 1; ...
Returns the next pseudorandom, approximately uniformly distributed {@code int} value between 0 (inclusive) and {@code n} (exclusive). @see java.util.Random#nextInt(int) @Override public int nextInt(int n) { if (n <= 0) { throw new IllegalArgumentException("n must be positive"); } ...
141
169
411
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
892a68fc2f851743023231fe13ddfb8796895bc0c62c272f37dd41e7bc51733d
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
9626bf60912a5cb18372753c
Harium/keel
src/main/java/com/harium/keel/catalano/math/random/Pcg32.java
Pcg32.nextGaussian
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/random/Pcg32.java#L221-L238
train
java
Returns the next pseudorandom, Gaussian ("normally") distributed {@code double} value with mean {@code 0.0} and standard deviation {@code 1.0} from this random number generator's sequence. @see java.util.Random#nextGaussian()
public double nextGaussian() { // See Knuth, ACP, Section 3.4.1 Algorithm C. if (haveNextNextGaussian) { haveNextNextGaussian = false; return nextNextGaussian; } else { double v1, v2, s; do { v1 = 2 * nextDouble() - 1; // between -1...
Returns the next pseudorandom, Gaussian ("normally") distributed {@code double} value with mean {@code 0.0} and standard deviation {@code 1.0} from this random number generator's sequence. @see java.util.Random#nextGaussian() public double nextGaussian() { // See Knuth, ACP, Section 3.4.1 Algorithm C. ...
248
226
686
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
88ad5cadf04c3ca8737ed1826459a0ea24f9a94fef66dc65c471f8db9d48a2ae
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
f21046c23f25794d71a55582
Harium/keel
src/main/java/com/harium/keel/modifier/posit/SVD.java
SVD.svdcmp
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/modifier/posit/SVD.java#L10-L301
train
java
compute the SVD from a MxN matrix
public static boolean svdcmp(double[][] a, int m, int n, double[] w, double[][] v) { boolean flag = false; int i, its, j, jj, k, l = 0, nm = 0; double anorm = 0.0, c, f, g = 0.0, h, s, scale = 0.0, x, y, z; double[] rv1 = new double[n]; //Householder reduction to bidiagonal ...
compute the SVD from a MxN matrix public static boolean svdcmp(double[][] a, int m, int n, double[] w, double[][] v) { boolean flag = false; int i, its, j, jj, k, l = 0, nm = 0; double anorm = 0.0, c, f, g = 0.0, h, s, scale = 0.0, x, y, z; double[] rv1 = new double[n]; //H...
2,150
33
8,105
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
19b4b0b6fa10d0ac342b02ad35065c84834cd06c315fd58d57e355898fdfe38a
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
c5ca0b25ab154f2013913d3e
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Entropy
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L46-L71
train
java
Calculate entropy value. @param values Values. @return Returns entropy value of the specified histogram array.
public static double Entropy( int[] values ){ int n = values.length; int total = 0; double entropy = 0; double p; // calculate total amount of hits for ( int i = 0; i < n; i++ ) { total += values[i]; } if ( total != 0 ) ...
Calculate entropy value. @param values Values. @return Returns entropy value of the specified histogram array. public static double Entropy( int[] values ){ int n = values.length; int total = 0; double entropy = 0; double p; // calculate total amount of hits f...
187
110
693
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dc6b7c8f2ffdcbe8671b1ffa683758f5368714f40d2da28803020e15279d6e44
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
866b21e8012cba285ccc3c06
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.GetRange
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L79-L107
train
java
Get range around median containing specified percentage of values. @param values Values. @param percent Values percentage around median. @return Returns the range which containes specifies percentage of values.
public static IntRange GetRange( int[] values, double percent ){ int total = 0, n = values.length; // for all values for ( int i = 0; i < n; i++ ) { // accumalate total total += values[i]; } int min, max, hits; int h = (int) ( total * ( p...
Get range around median containing specified percentage of values. @param values Values. @param percent Values percentage around median. @return Returns the range which containes specifies percentage of values. public static IntRange GetRange( int[] values, double percent ){ int total = 0, n = values.length; ...
237
210
784
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d72e3c75377a3394ec7abf90c50596b0d03b5adcdbf29b32f8f8e860a210cbce
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
7d60316b0ace6e8388ea7919
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Kurtosis
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L114-L118
train
java
Calculate Kurtosis value. @param values Values. @return Returns kurtosis value of the specified histogram array.
public static double Kurtosis(int[] values){ double mean = Mean(values); double std = StdDev(values, mean); return Kurtosis(values, mean, std); }
Calculate Kurtosis value. @param values Values. @return Returns kurtosis value of the specified histogram array. public static double Kurtosis(int[] values){ double mean = Mean(values); double std = StdDev(values, mean); return Kurtosis(values, mean, std); }
59
112
173
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
601a4f7103d9883fa6d24b8fd99cdb481324517599c0a494bc0ff27e102c70eb
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
bfed3a104aa00189efd376fa
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Kurtosis
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L127-L144
train
java
Calculate Kurtosis value. @param values Values. @param mean Specified mean. @param stdDeviation Specified standard deviation. @return Returns kurtosis value of the specified histogram array.
public static double Kurtosis(int[] values, double mean, double stdDeviation){ double n = 0; for (int i = 0; i < values.length; i++) n += values[i]; double part1 = n * (n + 1); part1 /= ((n - 1) * (n - 2) * (n - 3)); double part2 = 0; for (in...
Calculate Kurtosis value. @param values Values. @param mean Specified mean. @param stdDeviation Specified standard deviation. @return Returns kurtosis value of the specified histogram array. public static double Kurtosis(int[] values, double mean, double stdDeviation){ double n = 0; for (int i = 0; i <...
222
190
584
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
47dacbb6c21400f17b9181f484ee1ece69036a1dab758e82e7cfe260664fce7c
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
56dd49cd6135d02876e472c8
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Mean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L151-L165
train
java
Calculate Mean value. @param values Values. @return Mean.
public static double Mean( int[] values ) { int hits; long total = 0; double mean = 0; // for all values for ( int i = 0, n = values.length; i < n; i++ ) { hits = values[i]; // accumulate mean mean += i * hits; // accumalat...
Calculate Mean value. @param values Values. @return Mean. public static double Mean( int[] values ) { int hits; long total = 0; double mean = 0; // for all values for ( int i = 0, n = values.length; i < n; i++ ) { hits = values[i]; // accumulate ...
120
57
420
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
090358b40cd243d0f84db0ebf9a8dad1211c0ecc11c31e241fc40446cd838090
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
2d0b961e36cbbc2c61bb6ab9
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Median
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L172-L194
train
java
Calculate Median value. @param values Values. @return Median.
public static int Median( int[] values ){ int total = 0, n = values.length; // for all values for ( int i = 0; i < n; i++ ) { // accumalate total total += values[i]; } int halfTotal = total / 2; int median = 0, v = 0; // find med...
Calculate Median value. @param values Values. @return Median. public static int Median( int[] values ){ int total = 0, n = values.length; // for all values for ( int i = 0; i < n; i++ ) { // accumalate total total += values[i]; } int halfTotal =...
138
61
508
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6b806373cda7cafd93ed67ef7d1100347e13376e4bad89b48cd4bf094dd900f3
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
bea07af6bf823eb2d8ff89a4
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Mode
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L201-L213
train
java
Calculate Mode value. @param values Values. @return Returns mode value of the histogram array.
public static int Mode( int[] values ){ int mode = 0, curMax = 0; for ( int i = 0, length = values.length; i < length; i++ ) { if ( values[i] > curMax ) { curMax = values[i]; mode = i; } } return mode; }
Calculate Mode value. @param values Values. @return Returns mode value of the histogram array. public static int Mode( int[] values ){ int mode = 0, curMax = 0; for ( int i = 0, length = values.length; i < length; i++ ) { if ( values[i] > curMax ) { curM...
96
94
316
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
47aec64d03cfcd7022739fa2e699d9ef6bbbd992c96518750ed650635f77ee40
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
cbab362e2f1e94aaaa6819e9
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Skewness
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L220-L224
train
java
Calculate Skewness value. @param values Values. @return Returns skewness value of the specified histogram array.
public static double Skewness(int[] values){ double mean = Mean(values); double std = StdDev(values, mean); return Skewness(values, mean, std); }
Calculate Skewness value. @param values Values. @return Returns skewness value of the specified histogram array. public static double Skewness(int[] values){ double mean = Mean(values); double std = StdDev(values, mean); return Skewness(values, mean, std); }
61
112
173
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
010b51e4ed0677296349f94d5c84920f344d0ab5587dfceb4ad93c13f156189c
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
dcc7380ae89d5d8704039cf9
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Skewness
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L233-L246
train
java
Calculate Skewness value. @param values Values. @param mean Specified mean. @param stdDeviation Specified standard deviation. @return Returns skewness value of the specified histogram array.
public static double Skewness(int[] values, double mean, double stdDeviation){ double n = 0; for (int i = 0; i < values.length; i++) n += values[i]; double part1 = n / (n - 1) * (n - 2); double part2 = 0; for (int i = 0; i < values.length; i++) { ...
Calculate Skewness value. @param values Values. @param mean Specified mean. @param stdDeviation Specified standard deviation. @return Returns skewness value of the specified histogram array. public static double Skewness(int[] values, double mean, double stdDeviation){ double n = 0; for (int i = 0; i <...
166
190
444
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
08019123cf864da007f92c915d73823b8ffc142ad45cd2dcc37712c305c906a7
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
c844fcdb1a6f46490957f438
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.StdDev
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L263-L281
train
java
Calculate standart deviation. @param values Values. @param mean Mean. @return Standart deviation.
public static double StdDev( int[] values, double mean ){ double stddev = 0; double diff; int hits; int total = 0; // for all values for ( int i = 0, n = values.length; i < n; i++ ) { hits = values[i]; diff = (double) i - mean; ...
Calculate standart deviation. @param values Values. @param mean Mean. @return Standart deviation. public static double StdDev( int[] values, double mean ){ double stddev = 0; double diff; int hits; int total = 0; // for all values for ( int i = 0, n = values.l...
157
97
542
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dc6616322b54a0532826fe6fe4120ce021ca4b77b857d78bb405c8e462b242f6
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
ff5c631cda16f34cdb471fb7
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/Event.java
Event.getValue
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/Event.java#L120-L126
train
java
Returns a value that has been stored using {@link #setValue(String, Object)}. As this method is generic, the value will automatically be casted to the target type of the expression in which this method is called. So this method has to be used with caution in respect to type safety. @param <E> Type of the resulting val...
@SuppressWarnings("unchecked") public <E> Optional<E> getValue(String key) { if (this.properties == null) { return Optional.empty(); } return Optional.ofNullable((E) getProperties().get(key)); }
Returns a value that has been stored using {@link #setValue(String, Object)}. As this method is generic, the value will automatically be casted to the target type of the expression in which this method is called. So this method has to be used with caution in respect to type safety. @param <E> Type of the resulting val...
163
481
238
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8c6b34c81a3641f755e87dc2ae22fefec89609996caf2159845eaa46e9993aa5
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
f812356ce50e4ae6a80ed2c2
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/Event.java
Event.getValueAs
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/Event.java#L139-L144
train
java
Returns a value that has been stored using {@link #setValue(String, Object)}. The value will be casted to the given type. @param <E> Type of the resulting value. @param key The key of the value to retrieve. @param type The type that the value will be casted to. @return The value or an empty optional if the value does ...
public <E> Optional<E> getValueAs(String key, Class<E> type) { if (this.properties == null) { return Optional.empty(); } return Optional.ofNullable(type.cast(getProperties().get(key))); }
Returns a value that has been stored using {@link #setValue(String, Object)}. The value will be casted to the given type. @param <E> Type of the resulting value. @param key The key of the value to retrieve. @param type The type that the value will be casted to. @return The value or an empty optional if the value does ...
131
353
227
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
131c7d788b46bc56cfd2cb33b8647873fd0557943a8c06a7cda96cb019aaf0d2
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
2baa834e962f8fcd2ef12481
Harium/keel
src/main/java/com/harium/keel/catalano/math/transform/DiscreteCosineTransform.java
DiscreteCosineTransform.Forward
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/DiscreteCosineTransform.java#L45-L61
train
java
1-D Forward Discrete Cosine Transform. @param data Data.
public static void Forward(double[] data) { double[] result = new double[data.length]; double sum; double scale = Math.sqrt(2.0 / data.length); for (int f = 0; f < data.length; f++) { sum = 0; for (int t = 0; t < data.length; t++) { double cos = M...
1-D Forward Discrete Cosine Transform. @param data Data. public static void Forward(double[] data) { double[] result = new double[data.length]; double sum; double scale = Math.sqrt(2.0 / data.length); for (int f = 0; f < data.length; f++) { sum = 0; for (int t ...
177
57
590
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3240727e786859550a784f7390fd5c5cedcb6f33b77e4094889c31c2cc50be3e
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
84e6c1bb7a42bbe69af4b611
Harium/keel
src/main/java/com/harium/keel/catalano/math/transform/DiscreteCosineTransform.java
DiscreteCosineTransform.Forward
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/DiscreteCosineTransform.java#L68-L94
train
java
2-D Forward Discrete Cosine Transform. @param data Data.
public static void Forward(double[][] data) { int rows = data.length; int cols = data[0].length; double[] row = new double[cols]; double[] col = new double[rows]; for (int i = 0; i < rows; i++) { for (int j = 0; j < row.length; j++) row[j] = data[i][...
2-D Forward Discrete Cosine Transform. @param data Data. public static void Forward(double[][] data) { int rows = data.length; int cols = data[0].length; double[] row = new double[cols]; double[] col = new double[rows]; for (int i = 0; i < rows; i++) { for (int j ...
209
57
705
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d82de5bc714586f39e0f40df609360704c47add0bbe56a440cbd24384b970b7e
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
beafcce5a708c87d40f366c3
Harium/keel
src/main/java/com/harium/keel/catalano/math/transform/DiscreteCosineTransform.java
DiscreteCosineTransform.Backward
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/DiscreteCosineTransform.java#L101-L117
train
java
1-D Backward Discrete Cosine Transform. @param data Data.
public static void Backward(double[] data) { double[] result = new double[data.length]; double sum; double scale = Math.sqrt(2.0 / data.length); for (int t = 0; t < data.length; t++) { sum = 0; for (int j = 0; j < data.length; j++) { double cos = ...
1-D Backward Discrete Cosine Transform. @param data Data. public static void Backward(double[] data) { double[] result = new double[data.length]; double sum; double scale = Math.sqrt(2.0 / data.length); for (int t = 0; t < data.length; t++) { sum = 0; for (int ...
174
58
585
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d7f76d18397ae51de4e474b7a106351565b6fa5c3ad9ed346ec221a1aa3e217b
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
555af91b4bcfb50ba3448e30
Harium/keel
src/main/java/com/harium/keel/effect/Clahe.java
Clahe.apply
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/effect/Clahe.java#L187-L405
train
java
This effect deals with OneBandSource and Binary MatrixSource @param source @return image
@Override public ImageSource apply(ImageSource source) { int width = source.getWidth(); int height = source.getHeight(); int[][] result = new int[height][width]; if (source.isGrayscale()) { for (int i = 0; i < height; i++) { int iMin = Math.ma...
This effect deals with OneBandSource and Binary MatrixSource @param source @return image @Override public ImageSource apply(ImageSource source) { int width = source.getWidth(); int height = source.getHeight(); int[][] result = new int[height][width]; if (source.isGrayscale(...
1,922
88
8,726
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ae4e7a4eefc13c1cb95aa049ae3c4db25ca0debfc235a803940af31834cc7726
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
ea285bda41f5683dfad294a6
skuzzle/jeve
jeve/src/it/java/de/skuzzle/jeve/SynchronousEventProviderIT.java
SynchronousEventProviderIT.getParameters
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/it/java/de/skuzzle/jeve/SynchronousEventProviderIT.java#L29-L41
train
java
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}.
@Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends EventProvider>) SequentialEventProvider::new, (Supplier<ListenerStore>) DefaultListenerStore::create ...
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}. @Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends Ev...
122
121
605
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ea671a0819c3b28cc03d52c0992926d103827f39f041472f8ff3160b18f22214
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
c9c3d0f2621ec15722db1ba6
Harium/keel
src/main/java/com/harium/keel/effect/LevelsLinear.java
LevelsLinear.setInRGB
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/effect/LevelsLinear.java#L222-L230
train
java
Set RGB input range. @param inRGB Range.
public void setInRGB(IntRange inRGB) { this.inRed = inRGB; this.inGreen = inRGB; this.inBlue = inRGB; CalculateMap(inRGB, outRed, mapRed); CalculateMap(inRGB, outGreen, mapGreen); CalculateMap(inRGB, outBlue, mapBlue); }
Set RGB input range. @param inRGB Range. public void setInRGB(IntRange inRGB) { this.inRed = inRGB; this.inGreen = inRGB; this.inBlue = inRGB; CalculateMap(inRGB, outRed, mapRed); CalculateMap(inRGB, outGreen, mapGreen); CalculateMap(inRGB, outBlue, mapBlue); ...
83
41
281
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
fa090646ac261dba63ac6ea3dd59732334adc3ddf501abc366eeb61cc30f5d5e
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
e2950859112d1a16639f7966
Harium/keel
src/main/java/com/harium/keel/effect/LevelsLinear.java
LevelsLinear.setOutRGB
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/effect/LevelsLinear.java#L237-L245
train
java
Set RGB output range. @param outRGB Range.
public void setOutRGB(IntRange outRGB) { this.outRed = outRGB; this.outGreen = outRGB; this.outBlue = outRGB; CalculateMap(inRed, outRGB, mapRed); CalculateMap(inGreen, outRGB, mapGreen); CalculateMap(inBlue, outRGB, mapBlue); }
Set RGB output range. @param outRGB Range. public void setOutRGB(IntRange outRGB) { this.outRed = outRGB; this.outGreen = outRGB; this.outBlue = outRGB; CalculateMap(inRed, outRGB, mapRed); CalculateMap(inGreen, outRGB, mapGreen); CalculateMap(inBlue, outRGB, ma...
83
43
289
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e39d2a306a8b7d1bba95776fa1f269adb4da4488e0a8f969c3267d171187c0f7
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
5ec66eaebb05b69898a54e15
Harium/keel
src/main/java/com/harium/keel/effect/LevelsLinear.java
LevelsLinear.CalculateMap
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/effect/LevelsLinear.java#L285-L305
train
java
Calculate conversion map. @param inRange Input range. @param outRange Output range. @param map Conversion map.
private void CalculateMap(IntRange inRange, IntRange outRange, int[] map) { double k = 0, b = 0; if (inRange.getMax() != inRange.getMin()) { k = (double) (outRange.getMax() - outRange.getMin()) / (double) (inRange.getMax() - inRange.getMin()); b = (double) (outRange.getMin(...
Calculate conversion map. @param inRange Input range. @param outRange Output range. @param map Conversion map. private void CalculateMap(IntRange inRange, IntRange outRange, int[] map) { double k = 0, b = 0; if (inRange.getMax() != inRange.getMin()) { k = (double) (outRange.getM...
203
117
700
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
181915cd2b32ebd838b6e2deba33e718f3e27ed3cade2d8108420eed2709e37c
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
8a2877dec6c6e46592d93020
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.createShareForDevice
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L133-L136
train
java
Share a device Share a device @param deviceId Device ID. (required) @param deviceShareInfo Device object that needs to be added (required) @return DeviceSharingId @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public DeviceSharingId createShareForDevice(String deviceId, DeviceShareInfo deviceShareInfo) throws ApiException { ApiResponse<DeviceSharingId> resp = createShareForDeviceWithHttpInfo(deviceId, deviceShareInfo); return resp.getData(); }
Share a device Share a device @param deviceId Device ID. (required) @param deviceShareInfo Device object that needs to be added (required) @return DeviceSharingId @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public DeviceSharingId createShareForDevice(String d...
108
266
257
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
06d12b3681857c07920f4c8e99069f79437f98f3bb38b5cbb7fad559d37e1ce4
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
fd321a119f5afb43b80cdcb7
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.createShareForDeviceWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L146-L150
train
java
Share a device Share a device @param deviceId Device ID. (required) @param deviceShareInfo Device object that needs to be added (required) @return ApiResponse&lt;DeviceSharingId&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<DeviceSharingId> createShareForDeviceWithHttpInfo(String deviceId, DeviceShareInfo deviceShareInfo) throws ApiException { com.squareup.okhttp.Call call = createShareForDeviceValidateBeforeCall(deviceId, deviceShareInfo, null, null); Type localVarReturnType = new TypeToken<DeviceSharin...
Share a device Share a device @param deviceId Device ID. (required) @param deviceShareInfo Device object that needs to be added (required) @return ApiResponse&lt;DeviceSharingId&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public ApiResponse<DeviceSharingI...
142
285
405
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1ff3c668f09e417c999008a033367e4e1530ed186f976f1868d860a92f1bb28b
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
5efb1583e1ac7652da88feea
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.deleteSharingForDevice
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L261-L264
train
java
Delete specific share of the given device id Delete specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharingId @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public DeviceSharingId deleteSharingForDevice(String deviceId, String shareId) throws ApiException { ApiResponse<DeviceSharingId> resp = deleteSharingForDeviceWithHttpInfo(deviceId, shareId); return resp.getData(); }
Delete specific share of the given device id Delete specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharingId @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public DeviceSharingId dele...
109
291
236
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
85fffaf23df6d67f0460aadd48bf7cfb28326e79c29538106df8cb5629895609
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
6492c299f10f818077eb8fd6
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.deleteSharingForDeviceWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L274-L278
train
java
Delete specific share of the given device id Delete specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return ApiResponse&lt;DeviceSharingId&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<DeviceSharingId> deleteSharingForDeviceWithHttpInfo(String deviceId, String shareId) throws ApiException { com.squareup.okhttp.Call call = deleteSharingForDeviceValidateBeforeCall(deviceId, shareId, null, null); Type localVarReturnType = new TypeToken<DeviceSharingId>(){}.getType(); ...
Delete specific share of the given device id Delete specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return ApiResponse&lt;DeviceSharingId&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public A...
143
310
384
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0478bff6384715ee6b9a06c4ee14fb319dde28f5ae8282dd9dfb94e572ee2fda
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
b6cdbce9167210418a6b5bc5
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.getAllSharesForDevice
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L388-L391
train
java
List all shares for the given device id List all shares for the given device id @param deviceId Device ID. (required) @param count Desired count of items in the result set. (optional) @param offset Offset for pagination. (optional) @return DeviceSharingEnvelope @throws ApiException If fail to call the API, e.g. server ...
public DeviceSharingEnvelope getAllSharesForDevice(String deviceId, Integer count, Integer offset) throws ApiException { ApiResponse<DeviceSharingEnvelope> resp = getAllSharesForDeviceWithHttpInfo(deviceId, count, offset); return resp.getData(); }
List all shares for the given device id List all shares for the given device id @param deviceId Device ID. (required) @param count Desired count of items in the result set. (optional) @param offset Offset for pagination. (optional) @return DeviceSharingEnvelope @throws ApiException If fail to call the API, e.g. server ...
126
365
267
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d4e231c0500362e7e791c35e3e7a3eb8068d71e909e04ada9a9b51f7b4c22fe2
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
d4aa4815530c2e9e1b374f87
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.getAllSharesForDeviceWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L402-L406
train
java
List all shares for the given device id List all shares for the given device id @param deviceId Device ID. (required) @param count Desired count of items in the result set. (optional) @param offset Offset for pagination. (optional) @return ApiResponse&lt;DeviceSharingEnvelope&gt; @throws ApiException If fail to call th...
public ApiResponse<DeviceSharingEnvelope> getAllSharesForDeviceWithHttpInfo(String deviceId, Integer count, Integer offset) throws ApiException { com.squareup.okhttp.Call call = getAllSharesForDeviceValidateBeforeCall(deviceId, count, offset, null, null); Type localVarReturnType = new TypeToken<DeviceSh...
List all shares for the given device id List all shares for the given device id @param deviceId Device ID. (required) @param count Desired count of items in the result set. (optional) @param offset Offset for pagination. (optional) @return ApiResponse&lt;DeviceSharingEnvelope&gt; @throws ApiException If fail to call th...
160
384
415
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ee373c4eb02461cf56703cad057b87a5b286b8df39a86c6e0e59e813235e5f83
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
b05c52ac52db00becf616f92
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.getSharingForDevice
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L518-L521
train
java
Get specific share of the given device id Get specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharing @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public DeviceSharing getSharingForDevice(String deviceId, String shareId) throws ApiException { ApiResponse<DeviceSharing> resp = getSharingForDeviceWithHttpInfo(deviceId, shareId); return resp.getData(); }
Get specific share of the given device id Get specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharing @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public DeviceSharing getSharingForD...
106
283
226
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
af4a7b9244b7e9b933181fae718163f7798a4d6e8c332bc179f7010980677323
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
b1b8168d208b0e2c415fda1d
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.getSharingForDeviceWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L531-L535
train
java
Get specific share of the given device id Get specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return ApiResponse&lt;DeviceSharing&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<DeviceSharing> getSharingForDeviceWithHttpInfo(String deviceId, String shareId) throws ApiException { com.squareup.okhttp.Call call = getSharingForDeviceValidateBeforeCall(deviceId, shareId, null, null); Type localVarReturnType = new TypeToken<DeviceSharing>(){}.getType(); ret...
Get specific share of the given device id Get specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return ApiResponse&lt;DeviceSharing&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public ApiRespon...
140
302
374
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b042a74e89ca95ac0009999f052d207cb401d4be5a3617d745d9c0881319fd3f
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
fde0c70601739cbc75912613
Harium/keel
src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java
ImageStatistics.Mean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java#L181-L193
train
java
Calculate Mean value. @param fastBitmap Image to be processed. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Mean.
public static float Mean(ImageSource fastBitmap, int startX, int startY, int width, int height) { float mean = 0; if (fastBitmap.isGrayscale()) { for (int i = startX; i < height; i++) { for (int j = startY; j < width; j++) { mean += fastBitmap.getRGB(...
Calculate Mean value. @param fastBitmap Image to be processed. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Mean. public static float Mean(ImageSource fastBitmap, int startX, int startY, int width, int height) { ...
157
218
549
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1878e0222f81294f8be11fc087766a4dd4639b3d7e1c58c8f7d84406a8dc2e88
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
c0c122ac838a1b80bd86bcac
Harium/keel
src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java
ImageStatistics.Variance
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java#L213-L215
train
java
Calculate Variance. @param fastBitmap Image to be processed. @param mean Mean. @return Variance.
public static float Variance(ImageSource fastBitmap, float mean) { return Variance(fastBitmap, mean, 0, 0, fastBitmap.getWidth(), fastBitmap.getHeight()); }
Calculate Variance. @param fastBitmap Image to be processed. @param mean Mean. @return Variance. public static float Variance(ImageSource fastBitmap, float mean) { return Variance(fastBitmap, mean, 0, 0, fastBitmap.getWidth(), fastBitmap.getHeight()); }
61
103
170
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d084ef7069397b67181c5b9431e13fa44b9fec0e04a44f9757d52d358f77aa7e
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
91abe94a744e4dc17667728c
Harium/keel
src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java
ImageStatistics.Variance
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java#L228-L241
train
java
Calculate Variance. @param fastBitmap Image to be processed. @param mean Mean. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Variance.
public static float Variance(ImageSource fastBitmap, float mean, int startX, int startY, int width, int height) { float sum = 0; if (fastBitmap.isGrayscale()) { for (int i = startX; i < height; i++) { for (int j = startY; j < width; j++) { sum += Ma...
Calculate Variance. @param fastBitmap Image to be processed. @param mean Mean. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Variance. public static float Variance(ImageSource fastBitmap, float mean, int start...
183
244
602
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c92f7b003aac4ad4c9a611e870b361fb54fdb22d39d2e2880d420cd6da0fb122
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
7f01985b71458406e40c915e
Harium/keel
src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java
ImageStatistics.Maximum
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java#L263-L287
train
java
Get maximum gray value in the image. @param fastBitmap Image to be processed. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Maximum gray.
public static int Maximum(ImageSource fastBitmap, int startX, int startY, int width, int height) { int max = 0; if (fastBitmap.isGrayscale()) { for (int i = startX; i < height; i++) { for (int j = startY; j < width; j++) { int gray = fastBitmap.getR...
Get maximum gray value in the image. @param fastBitmap Image to be processed. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Maximum gray. public static int Maximum(ImageSource fastBitmap, int startX, int startY, int...
219
241
818
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cebfa9e615b3c7f010c2dd21e733d756c007b4eade0183acd14fbf1f24670418
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
80ae7a30c9c48f141fe71389
Harium/keel
src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java
ImageStatistics.Minimum
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/tools/ImageStatistics.java#L309-L331
train
java
Get minimum gray value in the image. @param fastBitmap Image to be processed. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Minimum gray.
public static int Minimum(ImageSource fastBitmap, int startX, int startY, int width, int height) { int min = 255; if (fastBitmap.isGrayscale()) { for (int i = startX; i < height; i++) { for (int j = startY; j < width; j++) { int gray = fastBitmap.getR...
Get minimum gray value in the image. @param fastBitmap Image to be processed. @param startX Initial X axis coordinate. @param startY Initial Y axis coordinate. @param width Width. @param height Height. @return Minimum gray. public static int Minimum(ImageSource fastBitmap, int startX, int startY, int...
219
241
816
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
302f83ed2ad02838abdb638d348d005d50c35f77d3df2733aaca314a24f66393
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
485dd60dd54e45ec22bb795a
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Bhattacharyya
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L68-L77
train
java
Bhattacharyya distance between two normalized histograms. @param histogram1 Normalized histogram. @param histogram2 Normalized histogram. @return The Bhattacharyya distance between the two histograms.
public static double Bhattacharyya(double[] histogram1, double[] histogram2) { int bins = histogram1.length; // histogram bins double b = 0; // Bhattacharyya's coefficient for (int i = 0; i < bins; i++) b += Math.sqrt(histogram1[i]) * Math.sqrt(histogram2[i]); // Bhattachar...
Bhattacharyya distance between two normalized histograms. @param histogram1 Normalized histogram. @param histogram2 Normalized histogram. @return The Bhattacharyya distance between the two histograms. public static double Bhattacharyya(double[] histogram1, double[] histogram2) { int bins = histogram1.length; ...
140
201
403
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
64b8728c24feff6217bb3a0c985b743dca5a2affc47c037e3e8f9cfcbf48365f
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
ee9d15af8876bb14f6df9483
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.BrayCurtis
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L86-L96
train
java
Gets the Bray Curtis distance between two points. @param p A point in space. @param q A point in space. @return The Bray Curtis distance between x and y.
public static double BrayCurtis(double[] p, double[] q) { double sumP, sumN; sumP = sumN = 0; for (int i = 0; i < p.length; i++) { sumN += Math.abs(p[i] - q[i]); sumP += Math.abs(p[i] + q[i]); } return sumN / sumP; }
Gets the Bray Curtis distance between two points. @param p A point in space. @param q A point in space. @return The Bray Curtis distance between x and y. public static double BrayCurtis(double[] p, double[] q) { double sumP, sumN; sumP = sumN = 0; for (int i = 0; i < p.length; i++) { ...
122
154
286
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0ff66b9d950aa319520f974fc5f1ff67457824ee1def254b859b804d364b1c53
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
80a669c605efff737082494f
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.BrayCurtis
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L107-L112
train
java
Gets the Bray Curtis distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 X2 axis coordinate. @return The Bray Curtis distance between x and y.
public static double BrayCurtis(double x1, double y1, double x2, double y2) { double sumN = Math.abs(x1 - x2) + Math.abs(y1 - y2); double sumP = Math.abs(x1 + x2) + Math.abs(y1 + y2); return sumN / sumP; }
Gets the Bray Curtis distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 X2 axis coordinate. @return The Bray Curtis distance between x and y. public static double BrayCurtis(double x1, double y1, double x2, double y2) { double sumN ...
129
220
234
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3fa6d91612afb135d558e22beb5625f192f66c088e2dbcb18ddab600dc880c59
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
a93a85e82f9aecee57a7d82b
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.BrayCurtis
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L121-L123
train
java
Gets the Bray Curtis distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Bray Curtis distance between x and y.
public static double BrayCurtis(IntPoint p, IntPoint q) { return BrayCurtis(p.x, p.y, q.x, q.y); }
Gets the Bray Curtis distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Bray Curtis distance between x and y. public static double BrayCurtis(IntPoint p, IntPoint q) { return BrayCurtis(p.x, p.y, q.x, q.y); }
77
198
110
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
244235f7d48ecb6d13ef1130d5b45bfbb92dd58f3a6089d6309824909caed32f
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
f58b55ffaec2278b83cbabe0
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Canberra
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L132-L140
train
java
Gets the Canberra distance between two points. @param p A point in space. @param q A point in space. @return The Canberra distance between x and y.
public static double Canberra(double[] p, double[] q) { double distance = 0; for (int i = 0; i < p.length; i++) { distance += Math.abs(p[i] - q[i]) / (Math.abs(p[i]) + Math.abs(q[i])); } return distance; }
Gets the Canberra distance between two points. @param p A point in space. @param q A point in space. @return The Canberra distance between x and y. public static double Canberra(double[] p, double[] q) { double distance = 0; for (int i = 0; i < p.length; i++) { distance += Math.abs(p[i] -...
101
148
255
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0e0702ed8e1334cd929b44bc0fb5c01489085450c07956dbb48e2e919a00cf29
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
167ee79d65c3efdb73b2fe60
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Canberra
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L151-L158
train
java
Gets the Canberra distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Canberra distance between x and y.
public static double Canberra(double x1, double y1, double x2, double y2) { double distance; distance = Math.abs(x1 - x2) / (Math.abs(x1) + Math.abs(x2)); distance += Math.abs(y1 - y2) / (Math.abs(y1) + Math.abs(y2)); return distance; }
Gets the Canberra distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Canberra distance between x and y. public static double Canberra(double x1, double y1, double x2, double y2) { double distance; ...
128
214
274
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
32f5b94526085839b182e372014cff55cccf2efee82660ee225397b9661c39f4
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
6a793d587aa235e5142fabb9
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Canberra
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L167-L169
train
java
Gets the Canberra distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Canberra distance between x and y.
public static double Canberra(IntPoint p, IntPoint q) { return Canberra(p.x, p.y, q.x, q.y); }
Gets the Canberra distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Canberra distance between x and y. public static double Canberra(IntPoint p, IntPoint q) { return Canberra(p.x, p.y, q.x, q.y); }
69
192
106
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
744db577ebeafbfde722f8f914fcd93890ad949b8971fa05bded49e3d3a705f4
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
e10f00b8ca007cfaf066e970
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chebyshev
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L178-L187
train
java
Gets the Chebyshev distance between two points. @param p A point in space. @param q A point in space. @return The Chebyshev distance between x and y.
public static double Chebyshev(double[] p, double[] q) { double max = Math.abs(p[0] - q[0]); for (int i = 1; i < p.length; i++) { double abs = Math.abs(p[i] - q[i]); if (abs > max) max = abs; } return max; }
Gets the Chebyshev distance between two points. @param p A point in space. @param q A point in space. @return The Chebyshev distance between x and y. public static double Chebyshev(double[] p, double[] q) { double max = Math.abs(p[0] - q[0]); for (int i = 1; i < p.length; i++) { double ab...
117
150
269
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d7c0ebd84834b69e291a48ecdb042293e8ec21c013a833b73c99c73743f15b43
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
63f6b713ecfe3240580f8ad7
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chebyshev
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L198-L201
train
java
Gets the Chebyshev distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Chebyshev distance between x and y.
public static double Chebyshev(double x1, double y1, double x2, double y2) { double max = Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); return max; }
Gets the Chebyshev distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Chebyshev distance between x and y. public static double Chebyshev(double x1, double y1, double x2, double y2) { double max = Math...
107
216
171
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
16665f40330958cc9d4daa264c6788b5577acac671db4553fcaa107ff279a81a
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
bbce68ee02f4d2e054d96cdd
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chebyshev
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L210-L212
train
java
Gets the Chebyshev distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Chebyshev distance between x and y.
public static double Chebyshev(IntPoint p, IntPoint q) { return Chebyshev(p.x, p.y, q.x, q.y); }
Gets the Chebyshev distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Chebyshev distance between x and y. public static double Chebyshev(IntPoint p, IntPoint q) { return Chebyshev(p.x, p.y, q.x, q.y); }
81
194
108
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e301f4434605e1b29333c7b6b77a53c3734c1c281c55897405873f33e52dd5e5
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
984cba0991f664cd94362b42
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chessboard
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L221-L229
train
java
Gets the Chessboard distance between two points. @param x A point in space. @param y A point in space. @return The Chessboard distance between x and y.
public static double Chessboard(double[] x, double[] y) { double d = 0; for (int i = 0; i < x.length; i++) { d = Math.max(d, x[i] - y[i]); } return d; }
Gets the Chessboard distance between two points. @param x A point in space. @param y A point in space. @return The Chessboard distance between x and y. public static double Chessboard(double[] x, double[] y) { double d = 0; for (int i = 0; i < x.length; i++) { d = Math.max(d, x[i] - y[i])...
93
152
202
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1bcc12df2d9004bf38755069c8c92be6b7b2c847b23f05d97013e525477b64fd
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
2732ebb9a11e9e4d9e0e7585
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chessboard
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L240-L245
train
java
Gets the Chessboard distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Chessboard distance between x and y.
public static double Chessboard(double x1, double y1, double x2, double y2) { double dx = Math.abs(x1 - x2); double dy = Math.abs(y1 - y2); return Math.max(dx, dy); }
Gets the Chessboard distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Chessboard distance between x and y. public static double Chessboard(double x1, double y1, double x2, double y2) { double dx = Ma...
107
218
195
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cccdbfb42f29d8fec432642e6b1692c25b2f51aa46dd8bcdf235b8204d4e6165
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
6f1eaaf3fd8ec0139a6d4396
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chessboard
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L254-L256
train
java
Gets the Chessboard distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Chessboard distance between x and y.
public static double Chessboard(IntPoint p, IntPoint q) { return Chessboard(p.x, p.y, q.x, q.y); }
Gets the Chessboard distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Chessboard distance between x and y. public static double Chessboard(IntPoint p, IntPoint q) { return Chessboard(p.x, p.y, q.x, q.y); }
73
196
110
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
12e85f291624b382f2803954b735845de8ee9a203555733e9278d18daead6234
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
89e9297d8593371ae6b924da
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.ChiSquare
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L265-L274
train
java
Gets the Chi Square distance between two normalized histograms. @param histogram1 Histogram. @param histogram2 Histogram. @return The Chi Square distance between x and y.
public static double ChiSquare(double[] histogram1, double[] histogram2) { double r = 0; for (int i = 0; i < histogram1.length; i++) { double t = histogram1[i] + histogram2[i]; if (t != 0) r += Math.pow(histogram1[i] - histogram2[i], 2) / t; } ret...
Gets the Chi Square distance between two normalized histograms. @param histogram1 Histogram. @param histogram2 Histogram. @return The Chi Square distance between x and y. public static double ChiSquare(double[] histogram1, double[] histogram2) { double r = 0; for (int i = 0; i < histogram1.length; i++...
126
171
338
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
075b75ecc9ee315c86604761bfa20c58a5500a9da4aea254477f593bfd71a681
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
c2003bdca17760b198e53562
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Correlation
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L283-L308
train
java
Gets the Correlation distance between two points. @param p A point in space. @param q A point in space. @return The Correlation distance between x and y.
public static double Correlation(double[] p, double[] q) { double x = 0; double y = 0; for (int i = 0; i < p.length; i++) { x += -p[i]; y += -q[i]; } x /= p.length; y /= q.length; double num = 0; double den1 = 0; double ...
Gets the Correlation distance between two points. @param p A point in space. @param q A point in space. @return The Correlation distance between x and y. public static double Correlation(double[] p, double[] q) { double x = 0; double y = 0; for (int i = 0; i < p.length; i++) { x ...
224
154
607
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a1d3196af763f57367fc47fc3bc5352f954e5bee7810d11ba9eeb10b4ea636b8
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
fb169c724949d22b9bc6ab89
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Cosine
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L317-L333
train
java
Gets the Cosine distance between two points. @param p A point in space. @param q A point in space. @return The Cosine distance between x and y.
public static double Cosine(double[] p, double[] q) { double sumProduct = 0; double sumP = 0, sumQ = 0; for (int i = 0; i < p.length; i++) { sumProduct += p[i] * q[i]; sumP += Math.pow(Math.abs(p[i]), 2); sumQ += Math.pow(Math.abs(q[i]), 2); } ...
Gets the Cosine distance between two points. @param p A point in space. @param q A point in space. @return The Cosine distance between x and y. public static double Cosine(double[] p, double[] q) { double sumProduct = 0; double sumP = 0, sumQ = 0; for (int i = 0; i < p.length; i++) { ...
169
144
466
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6796fd59156b0378615bbd2fa13dafa865678189b9497768e5d4c95a885f2e7a
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
51bd74bd033b90e446d5eec1
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Cosine
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L344-L354
train
java
Gets the Cosine distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Cosine distance between x and y.
public static double Cosine(double x1, double y1, double x2, double y2) { double sumProduct = x1 * x2 + y1 * y2; double sumP = Math.pow(Math.abs(x1), 2) + Math.pow(Math.abs(x2), 2); double sumQ = Math.pow(Math.abs(y1), 2) + Math.pow(Math.abs(y2), 2); sumP = Math.sqrt(sumP); sumQ...
Gets the Cosine distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Cosine distance between x and y. public static double Cosine(double x1, double y1, double x2, double y2) { double sumProduct = x1 * ...
184
210
427
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e93ca866842cb6da2001def42bcab330d994640ddb22479bb49f57a7251ff00b
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
28054fa9ec7349884b3849f6
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Cosine
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L363-L365
train
java
Gets the Cosine distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Cosine distance between x and y.
public static double Cosine(IntPoint p, IntPoint q) { return Cosine(p.x, p.y, q.x, q.y); }
Gets the Cosine distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Cosine distance between x and y. public static double Cosine(IntPoint p, IntPoint q) { return Cosine(p.x, p.y, q.x, q.y); }
73
188
102
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
00a7fe242e35634ffafd9b408fc91c08b9be2eca78bcefce1936987b623de9ad
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
dd32d40fc7358c45e76d0ef0
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Euclidean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L387-L392
train
java
Gets the Euclidean distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Euclidean distance between x and y.
public static double Euclidean(double x1, double y1, double x2, double y2) { double dx = Math.abs(x1 - x2); double dy = Math.abs(y1 - y2); return Math.sqrt(dx * dx + dy * dy); }
Gets the Euclidean distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @return The Euclidean distance between x and y. public static double Euclidean(double x1, double y1, double x2, double y2) { double dx = Math....
111
216
206
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
89810bcc84c095161f18ce8d780e973fe9c8b71f7b38642cfe82313962e481cf
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
20afac7c257ddb2a00bf48ac
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Euclidean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L401-L403
train
java
Gets the Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Euclidean distance between x and y.
public static double Euclidean(IntPoint p, IntPoint q) { return Euclidean(p.x, p.y, q.x, q.y); }
Gets the Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Euclidean distance between x and y. public static double Euclidean(IntPoint p, IntPoint q) { return Euclidean(p.x, p.y, q.x, q.y); }
73
194
108
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3594217cefdbfa595f823905fab4049c22d2ef8dbc471a6a7c3631a765d6cb23
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
4331954f0a0d6145fa46b964
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Hamming
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L412-L422
train
java
Gets the Hamming distance between two strings. @param first First string. @param second Second string. @return The Hamming distance between p and q.
public static int Hamming(String first, String second) { if (first.length() != second.length()) throw new IllegalArgumentException("The size of string must be the same."); int diff = 0; for (int i = 0; i < first.length(); i++) if (first.charAt(i) != second.charAt(i)) ...
Gets the Hamming distance between two strings. @param first First string. @param second Second string. @return The Hamming distance between p and q. public static int Hamming(String first, String second) { if (first.length() != second.length()) throw new IllegalArgumentException("The size of str...
110
150
368
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9c147829c9aa3de47c200ef6b936024e831fd21b299330559c57a1b6fbc845ab
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
70a4d13d7b50776afaab944d
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.JaccardDistance
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L431-L451
train
java
Gets the Jaccard distance between two points. @param p A point in space. @param q A point in space. @return The Jaccard distance between x and y.
public static double JaccardDistance(double[] p, double[] q) { double distance = 0; int intersection = 0, union = 0; for (int x = 0; x < p.length; x++) { if ((p[x] != 0) || (q[x] != 0)) { if (p[x] == q[x]) { intersection++; } ...
Gets the Jaccard distance between two points. @param p A point in space. @param q A point in space. @return The Jaccard distance between x and y. public static double JaccardDistance(double[] p, double[] q) { double distance = 0; int intersection = 0, union = 0; for (int x = 0; x < p.length; ...
171
146
531
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9a26c6298192670005425a239f38d63e3848a8e98373c042357b2d18987d686c
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
04f3fe95428d48544e0260a9
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.JensenShannonDivergence
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L509-L516
train
java
Gets the Jensen Shannon divergence. @param p U vector. @param q V vector. @return The Jensen Shannon divergence between u and v.
public static double JensenShannonDivergence(double[] p, double[] q) { double[] m = new double[p.length]; for (int i = 0; i < m.length; i++) { m[i] = (p[i] + q[i]) / 2; } return (KullbackLeiblerDivergence(p, m) + KullbackLeiblerDivergence(q, m)) / 2; }
Gets the Jensen Shannon divergence. @param p U vector. @param q V vector. @return The Jensen Shannon divergence between u and v. public static double JensenShannonDivergence(double[] p, double[] q) { double[] m = new double[p.length]; for (int i = 0; i < m.length; i++) { m[i] = (p[i] + q[i...
126
129
301
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bd1eb7b89c2a5ef431b9ff5505580ccb7662e8947f94bf87b0c4faa9f80c2c88
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
e2346c81fd33f2c2beda51e1
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.KumarJohnsonDivergence
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L543-L551
train
java
Gets the Kumar-Johnson divergence. @param p P vector. @param q Q vector. @return The Kumar-Johnson divergence between p and q.
public static double KumarJohnsonDivergence(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { r += Math.pow(p[i] * p[i] - q[i] * q[i], 2) / 2 * Math.pow(p[i] * q[i], 1.5); } } return r; }
Gets the Kumar-Johnson divergence. @param p P vector. @param q Q vector. @return The Kumar-Johnson divergence between p and q. public static double KumarJohnsonDivergence(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { ...
140
127
320
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b7b055b724eb0936534898a0aaacc59d60e5d53ea211a0f5378408e3c7061ff5
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
c82d592076b1efb1be91df68
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.KullbackLeiblerDivergence
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L560-L575
train
java
Gets the Kullback Leibler divergence. @param p P vector. @param q Q vector. @return The Kullback Leibler divergence between u and v.
public static double KullbackLeiblerDivergence(double[] p, double[] q) { boolean intersection = false; double k = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { intersection = true; k += p[i] * Math.log(p[i] / q[i]); ...
Gets the Kullback Leibler divergence. @param p P vector. @param q Q vector. @return The Kullback Leibler divergence between u and v. public static double KullbackLeiblerDivergence(double[] p, double[] q) { boolean intersection = false; double k = 0; for (int i = 0; i < p.length; i++) { ...
149
133
445
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4577c96d4e12ec63cdc5bed9e8ca0a638a2242949d0f057a84c58b42ab2b6c53
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
f5834d7ecf3d68ee68a74df6
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Mahalanobis
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L584-L640
train
java
Gets the Mahalanobis distance. @param A Matrix A. @param B Matrix B. @return The Mahalanobis distance between A and B.
public static double Mahalanobis(double[][] A, double[][] B) { if (A[0].length != B[0].length) throw new IllegalArgumentException("The number of columns of both matrix must be equals."); double[][] subA = new double[A.length][A[0].length]; double[][] subB = new double[B.length][B[0...
Gets the Mahalanobis distance. @param A Matrix A. @param B Matrix B. @return The Mahalanobis distance between A and B. public static double Mahalanobis(double[][] A, double[][] B) { if (A[0].length != B[0].length) throw new IllegalArgumentException("The number of columns of both matrix must be eq...
600
119
1,989
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
5a4d5c8fc344deb58c68f5b9cbeceb78d0561cf204bb8e80b20f833e942b3b54
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
fd299377ecdd7bd13e425487
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Manhattan
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L686-L692
train
java
Gets the Manhattan distance between two points. @param p A point in space. @param q A point in space. @return The Manhattan distance between x and y.
public static double Manhattan(double[] p, double[] q) { double sum = 0; for (int i = 0; i < p.length; i++) { sum += Math.abs(p[i] - q[i]); } return sum; }
Gets the Manhattan distance between two points. @param p A point in space. @param q A point in space. @return The Manhattan distance between x and y. public static double Manhattan(double[] p, double[] q) { double sum = 0; for (int i = 0; i < p.length; i++) { sum += Math.abs(p[i] - q[i]); ...
88
150
203
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d5bd8bec27f8865f24903b2edcd362c7015ff720062842d42398276fa8737d43
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
ae4bf75bc40b02c385882ba7
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Manhattan
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L717-L719
train
java
Gets the Manhattan distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Manhattan distance between x and y.
public static double Manhattan(IntPoint p, IntPoint q) { return Manhattan(p.x, p.y, q.x, q.y); }
Gets the Manhattan distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Manhattan distance between x and y. public static double Manhattan(IntPoint p, IntPoint q) { return Manhattan(p.x, p.y, q.x, q.y); }
69
194
108
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bf6840ce9427cd45997aa66e96ad3a02fcbbcee7b996e16d5aea00c318907b35
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
447c86d91f53f5cd51092d1f
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Minkowski
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L731-L735
train
java
Gets the Minkowski distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @param r Order between two points. @return The Minkowski distance between x and y.
public static double Minkowski(double x1, double y1, double x2, double y2, int r) { double sum = Math.pow(Math.abs(x1 - x2), r); sum += Math.pow(Math.abs(y1 - y2), r); return Math.pow(sum, 1 / r); }
Gets the Minkowski distance between two points. @param x1 X1 axis coordinate. @param y1 Y1 axis coordinate. @param x2 X2 axis coordinate. @param y2 Y2 axis coordinate. @param r Order between two points. @return The Minkowski distance between x and y. public static double Minkowski(double x1, double y1, double x2, do...
131
252
226
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d66caeb8d446c109d4a2fcb7d5a9e644a6ddb845a15b9a6b121138153dff86a6
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
726955a23dd81a462b9952a2
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Minkowski
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L745-L747
train
java
Gets the Minkowski distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @param r Order between two points. @return The Minkowski distance between x and y.
public static double Minkowski(IntPoint p, IntPoint q, int r) { return Minkowski(p.x, p.y, q.x, q.y, r); }
Gets the Minkowski distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @param r Order between two points. @return The Minkowski distance between x and y. public static double Minkowski(IntPoint p, IntPoint q, int r) { return Minkowski(...
89
229
118
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
32e5a5cb37181108d1c6f5275c6b429cb31b7a53ee774eb1c9ec33fb893dac2a
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
68d1e69deb30477ef87343df
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Minkowski
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L757-L763
train
java
Gets the Minkowski distance between two points. @param u A point in space. @param v A point in space. @param p Order between two points. @return The Minkowski distance between x and y.
public static double Minkowski(double[] u, double[] v, double p) { double distance = 0; for (int i = 0; i < u.length; i++) { distance += Math.pow(Math.abs(u[i] - v[i]), p); } return Math.pow(distance, 1 / p); }
Gets the Minkowski distance between two points. @param u A point in space. @param v A point in space. @param p Order between two points. @return The Minkowski distance between x and y. public static double Minkowski(double[] u, double[] v, double p) { double distance = 0; for (int i = 0; i < u.length;...
115
185
258
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
886cbdf4164a8c25166f76d7d7fb1f7956cf112671f01aaafa72e7d9b3a244e7
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
06b8be2a9854cc06adfd3cc2
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.QuasiEuclidean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L774-L781
train
java
Gets the Quasi-Euclidean distance between two points. @param x1 X1 axis coordinates. @param y1 Y1 axis coordinates. @param x2 X2 axis coordinates. @param y2 Y2 axis coordinates. @return The Quasi-Euclidean distance between x and y.
public static double QuasiEuclidean(double x1, double y1, double x2, double y2) { if (Math.abs(x1 - x2) > Math.abs(y1 - y2)) { return Math.abs(x1 - x2) + (Constants.Sqrt2 - 1) * Math.abs(y1 - y2); } return (Constants.Sqrt2 - 1) * Math.abs(x1 - x2) + Math.abs(y1 - y2); }
Gets the Quasi-Euclidean distance between two points. @param x1 X1 axis coordinates. @param y1 Y1 axis coordinates. @param x2 X2 axis coordinates. @param y2 Y2 axis coordinates. @return The Quasi-Euclidean distance between x and y. public static double QuasiEuclidean(double x1, double y1, double x2, double y2) { ...
162
232
312
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
38f5fe7451ec844fa89525234c87d7bc81dc142c7e53620376e10b1868488671
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
8f55926a4bf7d905cdfdb7ab
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.QuasiEuclidean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L790-L792
train
java
Gets the Quasi-Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Quasi Euclidean distance between p and q.
public static double QuasiEuclidean(IntPoint p, IntPoint q) { return QuasiEuclidean(p.x, p.y, q.x, q.y); }
Gets the Quasi-Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Quasi Euclidean distance between p and q. public static double QuasiEuclidean(IntPoint p, IntPoint q) { return QuasiEuclidean(p.x, p.y, q.x, q.y);...
82
206
118
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b1068ef5a1e7aed5be58d0a487edc40481f32af201fd0f678dd1a284d622dd04
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
815a5fa356b388ca6d0b6a63
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.SquaredEuclidean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L801-L810
train
java
Gets the Square Euclidean distance between two points. @param x A point in space. @param y A point in space. @return The Square Euclidean distance between x and y.
public static double SquaredEuclidean(double[] x, double[] y) { double d = 0.0, u; for (int i = 0; i < x.length; i++) { u = x[i] - y[i]; d += u * u; } return d; }
Gets the Square Euclidean distance between two points. @param x A point in space. @param y A point in space. @return The Square Euclidean distance between x and y. public static double SquaredEuclidean(double[] x, double[] y) { double d = 0.0, u; for (int i = 0; i < x.length; i++) { u = x...
104
164
224
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2ec8cae84c8f47022ed5049bbc58ceea9d543b9f30d39c09dbd75e92c8dceac7
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
8bf49c9c40c671ce0cfa889a
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.SquaredEuclidean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L821-L827
train
java
Gets the Squared Euclidean distance between two points. @param x1 X1 axis coordinates. @param y1 Y1 axis coordinates. @param x2 X2 axis coordinates. @param y2 Y2 axis coordinates. @return The Squared euclidean distance between x and y.
public static double SquaredEuclidean(double x1, double y1, double x2, double y2) { double dx = x2 - x1; double dy = y2 - y1; return dx * dx + dy * dy; }
Gets the Squared Euclidean distance between two points. @param x1 X1 axis coordinates. @param y1 Y1 axis coordinates. @param x2 X2 axis coordinates. @param y2 Y2 axis coordinates. @return The Squared euclidean distance between x and y. public static double SquaredEuclidean(double x1, double y1, double x2, double y2) ...
111
236
183
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8b00183b4f81df7a3022f8454d0ae40d7eae2e500cf95727f4966481d2c65636
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
ff2e607f8b126273ccc77804
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.SquaredEuclidean
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L836-L842
train
java
Gets the Squared Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Squared euclidean distance between x and y.
public static double SquaredEuclidean(IntPoint p, IntPoint q) { double dx = q.x - p.x; double dy = q.y - p.y; return dx * dx + dy * dy; }
Gets the Squared Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Squared euclidean distance between x and y. public static double SquaredEuclidean(IntPoint p, IntPoint q) { double dx = q.x - p.x; doub...
93
210
167
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7f20910b69e3d82e4f00159a08c04c5e51d74e5701d330eba5a1beac999427a5
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
0324301cbca199c8128ebaa1
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.SymmetricChiSquareDivergence
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L851-L863
train
java
Gets the Symmetric Chi-square divergence. @param p P vector. @param q Q vector. @return The Symmetric chi-square divergence between p and q.
public static double SymmetricChiSquareDivergence(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { double den = p[i] * q[i]; if (den != 0) { double p1 = p[i] - q[i]; double p2 = p[i] + q[i]; r += (p1 * p1...
Gets the Symmetric Chi-square divergence. @param p P vector. @param q Q vector. @return The Symmetric chi-square divergence between p and q. public static double SymmetricChiSquareDivergence(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { double den = p[i] * q[...
143
141
382
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
921cfabb9ad9f3d1ace09d0cfc4a99659fd279ff81639dcd0bedb31f32e0f078
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
01af2affca128cfa9f3178f3
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.SymmetricKullbackLeibler
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L873-L880
train
java
Gets the Symmetric Kullback-Leibler distance. This metric is valid only for real and positive P and Q. @param p P vector. @param q Q vector. @return The Symmetric Kullback Leibler distance between p and q.
public static double SymmetricKullbackLeibler(double[] p, double[] q) { double dist = 0; for (int i = 0; i < p.length; i++) { dist += (p[i] - q[i]) * (Math.log(p[i]) - Math.log(q[i])); } return dist; }
Gets the Symmetric Kullback-Leibler distance. This metric is valid only for real and positive P and Q. @param p P vector. @param q Q vector. @return The Symmetric Kullback Leibler distance between p and q. public static double SymmetricKullbackLeibler(double[] p, double[] q) { double dist = 0; for (in...
127
206
250
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c5afd4a95032968f22613ea312cfe054378d027b203031ed0d3891dcb85e5d9e
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
57c2f41227fbc13186ad9f81
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Taneja
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L889-L898
train
java
Gets the Taneja divergence. @param p P vector. @param q Q vector. @return The Taneja divergence between p and q.
public static double Taneja(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { double pq = p[i] + q[i]; r += (pq / 2) * Math.log(pq / (2 * Math.sqrt(p[i] * q[i]))); } } return ...
Gets the Taneja divergence. @param p P vector. @param q Q vector. @return The Taneja divergence between p and q. public static double Taneja(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { double pq = p[i] + q[i]; ...
133
113
328
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e4824bf1195016e2b3f63bd1b8c0ab6b2bcfa69a2996ba09d621c5d125024ae2
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
74ae5a4c1d38cd5efc0d877d
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.TopsoeDivergence
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L907-L916
train
java
Gets the Topsoe divergence. @param p P vector. @param q Q vector. @return The Topsoe divergence between p and q.
public static double TopsoeDivergence(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { double den = p[i] + q[i]; r += p[i] * Math.log(2 * p[i] / den) + q[i] * Math.log(2 * q[i] / den); } ...
Gets the Topsoe divergence. @param p P vector. @param q Q vector. @return The Topsoe divergence between p and q. public static double TopsoeDivergence(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { double den = p[i...
143
113
350
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
31923ebb4d3432ae7fe5caee8a1186b70845002ea79d3f2da5ca06b2c3f926a1
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
51e6ba153505aada05e5bab5
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.createPricingTiers
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L135-L138
train
java
Define devicetype&#39;s pricing tiers. Define devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param pricingTierInfo Pricing tier info (required) @return DeviceTypePricingTier @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public DeviceTypePricingTier createPricingTiers(String dtid, DeviceTypePricingTier pricingTierInfo) throws ApiException { ApiResponse<DeviceTypePricingTier> resp = createPricingTiersWithHttpInfo(dtid, pricingTierInfo); return resp.getData(); }
Define devicetype&#39;s pricing tiers. Define devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param pricingTierInfo Pricing tier info (required) @return DeviceTypePricingTier @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public DeviceTypeP...
128
300
263
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e556729393a53e689fcec100e2f5f5b1a2fd4bdb326ccd49da89dea5264a72be
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
63aea9acfad0b230c8822fb1
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.createPricingTiersWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L148-L152
train
java
Define devicetype&#39;s pricing tiers. Define devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param pricingTierInfo Pricing tier info (required) @return ApiResponse&lt;DeviceTypePricingTier&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<DeviceTypePricingTier> createPricingTiersWithHttpInfo(String dtid, DeviceTypePricingTier pricingTierInfo) throws ApiException { com.squareup.okhttp.Call call = createPricingTiersValidateBeforeCall(dtid, pricingTierInfo, null, null); Type localVarReturnType = new TypeToken<DeviceTypePr...
Define devicetype&#39;s pricing tiers. Define devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param pricingTierInfo Pricing tier info (required) @return ApiResponse&lt;DeviceTypePricingTier&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body ...
162
319
411
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e8c41d74a63fc6dd1d3fa4ef3b6797a85c1993bb6f2c0b5759d092f0756f6a5d
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
ecc6ac6e4af4e4e4d1bc51e3
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.getPricingTiers
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L259-L262
train
java
Get a device&#39;s pricing tiers Get a device&#39;s pricing tiers @param did Device ID (required) @param active Filter by active (optional) @return DevicePricingTiersEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public DevicePricingTiersEnvelope getPricingTiers(String did, Boolean active) throws ApiException { ApiResponse<DevicePricingTiersEnvelope> resp = getPricingTiersWithHttpInfo(did, active); return resp.getData(); }
Get a device&#39;s pricing tiers Get a device&#39;s pricing tiers @param did Device ID (required) @param active Filter by active (optional) @return DevicePricingTiersEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public DevicePricingTiersEnvelope getPri...
114
278
233
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bd220071e51677fa1880f807a0c8c9e5bdbe682d23bacac8397b486ccce04a71
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
5ada66743d6ff2514002af68
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.getPricingTiersWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L272-L276
train
java
Get a device&#39;s pricing tiers Get a device&#39;s pricing tiers @param did Device ID (required) @param active Filter by active (optional) @return ApiResponse&lt;DevicePricingTiersEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<DevicePricingTiersEnvelope> getPricingTiersWithHttpInfo(String did, Boolean active) throws ApiException { com.squareup.okhttp.Call call = getPricingTiersValidateBeforeCall(did, active, null, null); Type localVarReturnType = new TypeToken<DevicePricingTiersEnvelope>(){}.getType(); ...
Get a device&#39;s pricing tiers Get a device&#39;s pricing tiers @param did Device ID (required) @param active Filter by active (optional) @return ApiResponse&lt;DevicePricingTiersEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public ApiResponse<De...
148
297
381
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6f39b550343c22182f0378cfde1fecb1ec737bba40fbffb80e0cbeb799f345ed
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
2d51fc5e2687d4e9418568d5
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.getThePricingTiers
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L387-L390
train
java
Get devicetype&#39;s pricing tiers. Get devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param version Version (required) @return DeviceTypePricingTiersEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public DeviceTypePricingTiersEnvelope getThePricingTiers(String dtid, Integer version) throws ApiException { ApiResponse<DeviceTypePricingTiersEnvelope> resp = getThePricingTiersWithHttpInfo(dtid, version); return resp.getData(); }
Get devicetype&#39;s pricing tiers. Get devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param version Version (required) @return DeviceTypePricingTiersEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public DeviceTypePricingTiersEnve...
124
285
251
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
885f0a84bfbb435642d77dc94f9e34edd55e4234cdf45944af7c49cc0bd7ec67
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
7912d95ca942f96da1c36773
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.getThePricingTiersWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L400-L404
train
java
Get devicetype&#39;s pricing tiers. Get devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param version Version (required) @return ApiResponse&lt;DeviceTypePricingTiersEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<DeviceTypePricingTiersEnvelope> getThePricingTiersWithHttpInfo(String dtid, Integer version) throws ApiException { com.squareup.okhttp.Call call = getThePricingTiersValidateBeforeCall(dtid, version, null, null); Type localVarReturnType = new TypeToken<DeviceTypePricingTiersEnvelope>()...
Get devicetype&#39;s pricing tiers. Get devicetype&#39;s pricing tiers. @param dtid DeviceType ID (required) @param version Version (required) @return ApiResponse&lt;DeviceTypePricingTiersEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public ApiResp...
158
304
399
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a9899e249eb44682cc6950021847af16111661dcf87b04e8113aaeaa47f4a484
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
847b0e62020850a1c37d65bd
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.getUpgradePath
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L515-L518
train
java
Get upgrade path Get upgrade path @param did Device ID (required) @param action Action to perform (required) @return UpgradePathEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public UpgradePathEnvelope getUpgradePath(String did, String action) throws ApiException { ApiResponse<UpgradePathEnvelope> resp = getUpgradePathWithHttpInfo(did, action); return resp.getData(); }
Get upgrade path Get upgrade path @param did Device ID (required) @param action Action to perform (required) @return UpgradePathEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public UpgradePathEnvelope getUpgradePath(String did, String action) throws Ap...
93
240
216
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3a24cafdf8af3020551fab8f44c03a83839beeaa4fb554e2f1118a493ec584db
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
f988fea684d6edffd0fb4482
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.getUpgradePathWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L528-L532
train
java
Get upgrade path Get upgrade path @param did Device ID (required) @param action Action to perform (required) @return ApiResponse&lt;UpgradePathEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<UpgradePathEnvelope> getUpgradePathWithHttpInfo(String did, String action) throws ApiException { com.squareup.okhttp.Call call = getUpgradePathValidateBeforeCall(did, action, null, null); Type localVarReturnType = new TypeToken<UpgradePathEnvelope>(){}.getType(); return apiCli...
Get upgrade path Get upgrade path @param did Device ID (required) @param action Action to perform (required) @return ApiResponse&lt;UpgradePathEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public ApiResponse<UpgradePathEnvelope> getUpgradePathWithH...
127
259
364
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2a9e93d9e7a0aefe13b345d9d5ee1e66eba2409f05d94d537b479f98a14742d9
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
eb1ade2d58ef9d34b0d29d5a
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.setPricingTier
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L642-L645
train
java
Set a device&#39;s pricing tier Set a device&#39;s pricing tier @param did Device ID (required) @param pricingTier Pricing tier (required) @return DevicePricingTierEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public DevicePricingTierEnvelope setPricingTier(String did, DevicePricingTierRequest pricingTier) throws ApiException { ApiResponse<DevicePricingTierEnvelope> resp = setPricingTierWithHttpInfo(did, pricingTier); return resp.getData(); }
Set a device&#39;s pricing tier Set a device&#39;s pricing tier @param did Device ID (required) @param pricingTier Pricing tier (required) @return DevicePricingTierEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public DevicePricingTierEnvelope setPricin...
117
276
256
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0c124a848a4bcbaae749e50507648f40f58834ce4d97a2bcf538bcde568984b5
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
f2984b6c1047d5bb2d897555
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MonetizationApi.java
MonetizationApi.setPricingTierWithHttpInfo
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MonetizationApi.java#L655-L659
train
java
Set a device&#39;s pricing tier Set a device&#39;s pricing tier @param did Device ID (required) @param pricingTier Pricing tier (required) @return ApiResponse&lt;DevicePricingTierEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
public ApiResponse<DevicePricingTierEnvelope> setPricingTierWithHttpInfo(String did, DevicePricingTierRequest pricingTier) throws ApiException { com.squareup.okhttp.Call call = setPricingTierValidateBeforeCall(did, pricingTier, null, null); Type localVarReturnType = new TypeToken<DevicePricingTierEnvelo...
Set a device&#39;s pricing tier Set a device&#39;s pricing tier @param did Device ID (required) @param pricingTier Pricing tier (required) @return ApiResponse&lt;DevicePricingTierEnvelope&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body public ApiResponse<Devi...
151
295
404
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b1cc0d7d29ae0d27ca19e3ee2f5cf4a55fef7e1afdb000fa608d8c9326ac8561
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE
87e44c0462f0a5e31a2898e6
Harium/keel
src/main/java/jdt/triangulation/Triangle.java
Triangle.nextNeighbor
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/Triangle.java#L160-L192
train
java
Returns the neighbors that shares the given corner and is not the previous triangle. @param p The given corner @param prevTriangle The previous triangle. @return The neighbors that shares the given corner and is not the previous triangle. By: Eyal Roth & Doron Ganel.
Triangle nextNeighbor(Vector3 p, Triangle prevTriangle) { Triangle neighbor = null; if (a.equals(p)) { neighbor = canext; } if (b.equals(p)) { neighbor = abnext; } if (c.equals(p)) { neighbor = bcnext; } if(prevTriangle == null) { return neighbor; } // Udi Schneider: Added a condit...
Returns the neighbors that shares the given corner and is not the previous triangle. @param p The given corner @param prevTriangle The previous triangle. @return The neighbors that shares the given corner and is not the previous triangle. By: Eyal Roth & Doron Ganel. Triangle nextNeighbor(Vector3 p, Triangle prevTria...
263
268
683
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0ac95fdbb5f844564783b7a1e407572df51411b6e251bdd0487f39b70af1c9b1
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
5805ebb7a914b5bb6d3dd166
Harium/keel
src/main/java/jdt/triangulation/Triangle.java
Triangle.contains
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/Triangle.java#L226-L245
train
java
determinates if this triangle contains the point p. @param p the query point @return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).
public boolean contains(Vector3 p) { boolean ans = false; if(this.halfplane || p== null) return false; if (isCorner(p)) { return true; } PointLinePosition a12 = PointLineTest.pointLineTest(a,b,p); PointLinePosition a23 = PointLineTest.pointLineTest(b,c,p); PointLinePosition a31 = PointLineTest.pointL...
determinates if this triangle contains the point p. @param p the query point @return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!). public boolean contains(Vector3 p) { boolean ans = false; if(this.halfplane || p== null) return false; if (isCorner(p)) { return ...
233
179
713
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b74a560e44fe251d8fee829a78992435791498f8eb6c996e7420def428a9bb7f
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
6b541b42a7d0ed764570d335
Harium/keel
src/main/java/jdt/triangulation/Triangle.java
Triangle.fallInsideCircumcircle
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/Triangle.java#L284-L301
train
java
Doron
public boolean fallInsideCircumcircle(Vector3[] arrayPoints) { boolean isInside = false; Vector3 p1 = this.p1(); Vector3 p2 = this.p2(); Vector3 p3 = this.p3(); int i = 0; while(!isInside && i<arrayPoints.length) { Vector3 p = arrayPoints[i]; if(!p.equals(p1)&& !p.equals(p2) && !p.equals(p3)) { ...
Doron public boolean fallInsideCircumcircle(Vector3[] arrayPoints) { boolean isInside = false; Vector3 p1 = this.p1(); Vector3 p2 = this.p2(); Vector3 p3 = this.p3(); int i = 0; while(!isInside && i<arrayPoints.length) { Vector3 p = arrayPoints[i]; if(!p.equals(p1)&& !p.equals(p2) && !p.equals(p3))...
138
5
403
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
93a80701970ead73dea867fcf3e39c02a467971fca56144d9f6e8e3a67990335
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
6a74372a97de3437460f28db
Harium/keel
src/main/java/jdt/triangulation/Triangle.java
Triangle.z_value
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/Triangle.java#L311-L381
train
java
compute the Z value for the X,Y values of q. <br /> assume this triangle represent a plane --> q does NOT need to be contained in this triangle. @param q query point (its Z value is ignored). @return the Z value of this plane implies by this triangle 3 points.
public float z_value(Vector3 q) { if(q==null || this.halfplane) throw new RuntimeException("*** ERR wrong parameters, can't approximate the z value ..***: "+q); /* incase the query point is on one of the points */ if(q.x==a.x & q.y==a.y) return a.z; if(q.x==b.x & q.y==b.y) return b.z; if(q.x==c.x & q.y==c.y) ...
compute the Z value for the X,Y values of q. <br /> assume this triangle represent a plane --> q does NOT need to be contained in this triangle. @param q query point (its Z value is ignored). @return the Z value of this plane implies by this triangle 3 points. public float z_value(Vector3 q) { if(q==null || this.ha...
697
261
1,383
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d00d99c556695d1bfe95ac29251eec57c615463217881089f8660616fc238bf0
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
8c24ce2c454b5443f0aa5d83
Harium/keel
src/main/java/jdt/triangulation/Triangle.java
Triangle.z
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/Triangle.java#L405-L408
train
java
compute the Z value for the X,Y values of q. assume this triangle represent a plane --> q does NOT need to be contained in this triangle. @param q query point (its Z value is ignored). @return q with updated Z value.
public Vector3 z(Vector3 q) { float z = z_value(q); return new Vector3(q.x, q.y, z); }
compute the Z value for the X,Y values of q. assume this triangle represent a plane --> q does NOT need to be contained in this triangle. @param q query point (its Z value is ignored). @return q with updated Z value. public Vector3 z(Vector3 q) { float z = z_value(q); return new Vector3(q.x, q.y, z); }
81
217
91
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6dd21c71f1450bc77627527e90e497860233331e575a2e9b7252f994c8ed7061
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
3ceb88bd8c5241b176604226
Harium/keel
src/main/java/jdt/triangulation/Triangle.java
Triangle.calcDet
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/Triangle.java#L423-L425
train
java
checks if the triangle is not re-entrant
public static float calcDet(Vector3 a ,Vector3 b, Vector3 c) { return (a.x*(b.y-c.y)) - (a.y*(b.x-c.x)) + (b.x*c.y-b.y*c.x); }
checks if the triangle is not re-entrant public static float calcDet(Vector3 a ,Vector3 b, Vector3 c) { return (a.x*(b.y-c.y)) - (a.y*(b.x-c.x)) + (b.x*c.y-b.y*c.x); }
62
40
129
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7fb77b11851f0b59dbb346ff4fe067353dc974e75ee4509a6cb08d6b2bba861d
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
ac3f15a3e1191c78e5a0331c
Harium/keel
src/main/java/jdt/triangulation/Triangle.java
Triangle.sharedSegments
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/Triangle.java#L447-L479
train
java
checks if the 2 triangles shares a segment @author Doron Ganel & Eyal Roth(2009) @param t2 - a second triangle @return boolean
public int sharedSegments(Triangle t2) { int counter = 0; if(a.equals(t2.a)) { counter++; } if(a.equals(t2.b)) { counter++; } if(a.equals(t2.c)) { counter++; } if(b.equals(t2.a)) { counter++; } if(b.equals(t2.b)) { counter++; } if(b.equals(t2.c)) { counter++; } if(c.equals...
checks if the 2 triangles shares a segment @author Doron Ganel & Eyal Roth(2009) @param t2 - a second triangle @return boolean public int sharedSegments(Triangle t2) { int counter = 0; if(a.equals(t2.a)) { counter++; } if(a.equals(t2.b)) { counter++; } if(a.equals(t2.c)) { counter++; } if(b.e...
192
126
451
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ff1b68e322338db00741301df3a9250266f5bd588055973d0558326f74e4835d
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
dc52619a13368014d638323c
Harium/keel
src/main/java/com/harium/keel/catalano/math/tools/ImageHistogram.java
ImageHistogram.update
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/tools/ImageHistogram.java#L212-L226
train
java
Update histogram.
private void update(){ total = 0; for (int i = 0; i < values.length; i++) { total += values[i]; } mean = HistogramStatistics.Mean( values ); stdDev = HistogramStatistics.StdDev( values, mean ); kurtosis = HistogramStatistics.Kurtosis(values, mean, ...
Update histogram. private void update(){ total = 0; for (int i = 0; i < values.length; i++) { total += values[i]; } mean = HistogramStatistics.Mean( values ); stdDev = HistogramStatistics.StdDev( values, mean ); kurtosis = HistogramStatistics.Kurt...
126
17
564
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
497a987658cfa116e776d1713453f61a908604f3ee2d6fc3fe99fbc3511fed43
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
a794b38932f7673ba1ae7644
Harium/keel
src/main/java/com/harium/keel/effect/BinaryErosion.java
BinaryErosion.apply
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/effect/BinaryErosion.java#L74-L89
train
java
Apply filter to an image. @param source FastBitmap
@Override public ImageSource apply(ImageSource source) { if (radius != 0) { if (source.isGrayscale()) { return applyGrayscale(source, radius); } else { return applyRGB(source, radius); } } else { if (source.isGr...
Apply filter to an image. @param source FastBitmap @Override public ImageSource apply(ImageSource source) { if (radius != 0) { if (source.isGrayscale()) { return applyGrayscale(source, radius); } else { return applyRGB(source, radius); ...
104
51
493
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e47c2509e3f18c8d7f58e50de69f1232e12caaaa0802213fb772634c7786d09d
LGPL-3.0
weak-copyleft
https://github.com/Harium/keel/blob/master/LICENSE
ea8a6125cf3f4a7f5273a676
artikcloud/artikcloud-java
src/main/java/cloud/artik/client/ApiClient.java
ApiClient.handleResponse
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/client/ApiClient.java#L1029-L1049
train
java
Handle the given response, return the deserialized object when the response is successful. @param <T> Type @param response Response @param returnType Return type @throws ApiException If the response has a unsuccessful status code or fail to deserialize the response body @return Type
public <T> T handleResponse(Response response, Type returnType) throws ApiException { if (response.isSuccessful()) { if (returnType == null || response.code() == 204) { // returning null if the returnType is not defined, // or the status code is 204 (No Content) ...
Handle the given response, return the deserialized object when the response is successful. @param <T> Type @param response Response @param returnType Return type @throws ApiException If the response has a unsuccessful status code or fail to deserialize the response body @return Type public <T> T handleResponse(Respon...
222
284
934
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1bbc35ad4ab4656714eed45c7e5f1cc3d5c0676e2b06a259b65f1f9ca8f17817
Apache-2.0
permissive
https://github.com/artikcloud/artikcloud-java/blob/master/LICENSE