repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.WSG84_L1
@Pure public static Point2d WSG84_L1(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_1_N, LAMBERT_1_C, LAMBERT_1_XS, LAMBERT_1_YS); }
java
@Pure public static Point2d WSG84_L1(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_1_N, LAMBERT_1_C, LAMBERT_1_XS, LAMBERT_1_YS); }
[ "@", "Pure", "public", "static", "Point2d", "WSG84_L1", "(", "double", "lambda", ",", "double", "phi", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "WSG84_NTFLamdaPhi", "(", "lambda", ",", "phi", ")", ";", "return", "NTFLambdaPhi_NTFLambert", "(", "ntfLa...
This function convert WSG84 GPS coordinate to France Lambert I coordinate. @param lambda in degrees. @param phi in degrees. @return the France Lambert I coordinates.
[ "This", "function", "convert", "WSG84", "GPS", "coordinate", "to", "France", "Lambert", "I", "coordinate", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1061-L1070
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.WSG84_L2
@Pure public static Point2d WSG84_L2(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_2_N, LAMBERT_2_C, LAMBERT_2_XS, LAMBERT_2_YS); }
java
@Pure public static Point2d WSG84_L2(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_2_N, LAMBERT_2_C, LAMBERT_2_XS, LAMBERT_2_YS); }
[ "@", "Pure", "public", "static", "Point2d", "WSG84_L2", "(", "double", "lambda", ",", "double", "phi", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "WSG84_NTFLamdaPhi", "(", "lambda", ",", "phi", ")", ";", "return", "NTFLambdaPhi_NTFLambert", "(", "ntfLa...
This function convert WSG84 GPS coordinate to France Lambert II coordinate. @param lambda in degrees. @param phi in degrees. @return the France Lambert II coordinates.
[ "This", "function", "convert", "WSG84", "GPS", "coordinate", "to", "France", "Lambert", "II", "coordinate", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1079-L1088
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.WSG84_L3
@Pure public static Point2d WSG84_L3(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS, LAMBERT_3_YS); }
java
@Pure public static Point2d WSG84_L3(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS, LAMBERT_3_YS); }
[ "@", "Pure", "public", "static", "Point2d", "WSG84_L3", "(", "double", "lambda", ",", "double", "phi", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "WSG84_NTFLamdaPhi", "(", "lambda", ",", "phi", ")", ";", "return", "NTFLambdaPhi_NTFLambert", "(", "ntfLa...
This function convert WSG84 GPS coordinate to France Lambert III coordinate. @param lambda in degrees. @param phi in degrees. @return the France Lambert III coordinates.
[ "This", "function", "convert", "WSG84", "GPS", "coordinate", "to", "France", "Lambert", "III", "coordinate", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1097-L1106
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.WSG84_L4
public static Point2d WSG84_L4(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_4_N, LAMBERT_4_C, LAMBERT_4_XS, LAMBERT_4_YS); }
java
public static Point2d WSG84_L4(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_4_N, LAMBERT_4_C, LAMBERT_4_XS, LAMBERT_4_YS); }
[ "public", "static", "Point2d", "WSG84_L4", "(", "double", "lambda", ",", "double", "phi", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "WSG84_NTFLamdaPhi", "(", "lambda", ",", "phi", ")", ";", "return", "NTFLambdaPhi_NTFLambert", "(", "ntfLambdaPhi", ".", ...
This function convert WSG84 GPS coordinate to France Lambert IV coordinate. @param lambda in degrees. @param phi in degrees. @return the France Lambert IV coordinates.
[ "This", "function", "convert", "WSG84", "GPS", "coordinate", "to", "France", "Lambert", "IV", "coordinate", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1115-L1123
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.WSG84_L93
@Pure public static Point2d WSG84_L93(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_93_N, LAMBERT_93_C, LAMBERT_93_XS, LAMBERT_93_YS); }
java
@Pure public static Point2d WSG84_L93(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_93_N, LAMBERT_93_C, LAMBERT_93_XS, LAMBERT_93_YS); }
[ "@", "Pure", "public", "static", "Point2d", "WSG84_L93", "(", "double", "lambda", ",", "double", "phi", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "WSG84_NTFLamdaPhi", "(", "lambda", ",", "phi", ")", ";", "return", "NTFLambdaPhi_NTFLambert", "(", "ntfL...
This function convert WSG84 GPS coordinate to France Lambert 93 coordinate. @param lambda in degrees. @param phi in degrees. @return the France Lambert 93 coordinates.
[ "This", "function", "convert", "WSG84", "GPS", "coordinate", "to", "France", "Lambert", "93", "coordinate", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1132-L1141
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.NTFLambdaPhi_NTFLambert
@SuppressWarnings({"checkstyle:parametername", "checkstyle:magicnumber", "checkstyle:localfinalvariablename", "checkstyle:localvariablename"}) private static Point2d NTFLambdaPhi_NTFLambert(double lambda, double phi, double n, double c, double Xs, double Ys) { //----------------------------------------------------...
java
@SuppressWarnings({"checkstyle:parametername", "checkstyle:magicnumber", "checkstyle:localfinalvariablename", "checkstyle:localvariablename"}) private static Point2d NTFLambdaPhi_NTFLambert(double lambda, double phi, double n, double c, double Xs, double Ys) { //----------------------------------------------------...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:parametername\"", ",", "\"checkstyle:magicnumber\"", ",", "\"checkstyle:localfinalvariablename\"", ",", "\"checkstyle:localvariablename\"", "}", ")", "private", "static", "Point2d", "NTFLambdaPhi_NTFLambert", "(", "double", "lamb...
This function convert the geographical NTF Lambda-Phi coordinate to one of the France NTF standard coordinate. @param lambda is the NTF coordinate. @param phi is the NTF coordinate. @param n is the exponential of the Lambert projection. @param c is the constant of projection. @param Xs is the x coordinate of the origi...
[ "This", "function", "convert", "the", "geographical", "NTF", "Lambda", "-", "Phi", "coordinate", "to", "one", "of", "the", "France", "NTF", "standard", "coordinate", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1155-L1194
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.WSG84_NTFLamdaPhi
@SuppressWarnings({"checkstyle:parametername", "checkstyle:magicnumber", "checkstyle:localfinalvariablename", "checkstyle:localvariablename"}) private static Point2d WSG84_NTFLamdaPhi(double lambda, double phi) { //--------------------------------------------------------- // 0) degree -> radian final double la...
java
@SuppressWarnings({"checkstyle:parametername", "checkstyle:magicnumber", "checkstyle:localfinalvariablename", "checkstyle:localvariablename"}) private static Point2d WSG84_NTFLamdaPhi(double lambda, double phi) { //--------------------------------------------------------- // 0) degree -> radian final double la...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:parametername\"", ",", "\"checkstyle:magicnumber\"", ",", "\"checkstyle:localfinalvariablename\"", ",", "\"checkstyle:localvariablename\"", "}", ")", "private", "static", "Point2d", "WSG84_NTFLamdaPhi", "(", "double", "lambda", ...
This function convert WSG84 GPS coordinate to one of the NTF Lambda-Phi coordinate. @param lambda is the WSG94 coordinate in decimal degrees. @param phi is the WSG84 coordinate is decimal in degrees. @param n is the exponential of the Lambert projection. @param c is the constant of projection. @param Xs is the x coord...
[ "This", "function", "convert", "WSG84", "GPS", "coordinate", "to", "one", "of", "the", "NTF", "Lambda", "-", "Phi", "coordinate", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1207-L1279
train
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/Tuple1dfx.java
Tuple1dfx.segmentProperty
@Pure public ObjectProperty<WeakReference<Segment1D<?, ?>>> segmentProperty() { if (this.segment == null) { this.segment = new SimpleObjectProperty<>(this, MathFXAttributeNames.SEGMENT); } return this.segment; }
java
@Pure public ObjectProperty<WeakReference<Segment1D<?, ?>>> segmentProperty() { if (this.segment == null) { this.segment = new SimpleObjectProperty<>(this, MathFXAttributeNames.SEGMENT); } return this.segment; }
[ "@", "Pure", "public", "ObjectProperty", "<", "WeakReference", "<", "Segment1D", "<", "?", ",", "?", ">", ">", ">", "segmentProperty", "(", ")", "{", "if", "(", "this", ".", "segment", "==", "null", ")", "{", "this", ".", "segment", "=", "new", "Simp...
Replies the segment property. @return the segment property.
[ "Replies", "the", "segment", "property", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/Tuple1dfx.java#L159-L165
train
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/Tuple1dfx.java
Tuple1dfx.set
void set(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) { this.segment = segment; this.x = x; this.y = y; }
java
void set(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) { this.segment = segment; this.x = x; this.y = y; }
[ "void", "set", "(", "ObjectProperty", "<", "WeakReference", "<", "Segment1D", "<", "?", ",", "?", ">", ">", ">", "segment", ",", "DoubleProperty", "x", ",", "DoubleProperty", "y", ")", "{", "this", ".", "segment", "=", "segment", ";", "this", ".", "x",...
Change the x and y properties. @param segment the new segment property. @param x the new x property. @param y the new y property.
[ "Change", "the", "x", "and", "y", "properties", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/Tuple1dfx.java#L256-L260
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.intersectsSegmentCapsule
@Pure public static boolean intersectsSegmentCapsule( double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double mx1, double my1, double mz1, double mx2, double my2, double mz2, double radius) { double d = distanceSquaredSegmentSegment( sx1, sy1, sz1, sx2, sy2, sz2, mx1, my1, mz1, m...
java
@Pure public static boolean intersectsSegmentCapsule( double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double mx1, double my1, double mz1, double mx2, double my2, double mz2, double radius) { double d = distanceSquaredSegmentSegment( sx1, sy1, sz1, sx2, sy2, sz2, mx1, my1, mz1, m...
[ "@", "Pure", "public", "static", "boolean", "intersectsSegmentCapsule", "(", "double", "sx1", ",", "double", "sy1", ",", "double", "sz1", ",", "double", "sx2", ",", "double", "sy2", ",", "double", "sz2", ",", "double", "mx1", ",", "double", "my1", ",", "...
Tests if the capsule is intersecting a segment. @param sx1 x coordinate of the first point of the segment. @param sy1 y coordinate of the first point of the segment. @param sz1 z coordinate of the first point of the segment. @param sx2 x coordinate of the second point of the segment. @param sy2 y coordinate of the sec...
[ "Tests", "if", "the", "capsule", "is", "intersecting", "a", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L204-L212
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.intersectsLineLine
@Pure public static boolean intersectsLineLine( double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4) { double s = computeLineLineIntersectionFactor(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4); return !Double.isNaN(s); }
java
@Pure public static boolean intersectsLineLine( double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4) { double s = computeLineLineIntersectionFactor(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4); return !Double.isNaN(s); }
[ "@", "Pure", "public", "static", "boolean", "intersectsLineLine", "(", "double", "x1", ",", "double", "y1", ",", "double", "z1", ",", "double", "x2", ",", "double", "y2", ",", "double", "z2", ",", "double", "x3", ",", "double", "y3", ",", "double", "z3...
Replies if two lines are intersecting. @param x1 is the first point of the first line. @param y1 is the first point of the first line. @param z1 is the first point of the first line. @param x2 is the second point of the first line. @param y2 is the second point of the first line. @param z2 is the second point of the f...
[ "Replies", "if", "two", "lines", "are", "intersecting", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L517-L525
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceSquaredSegmentPoint
@Pure public static double distanceSquaredSegmentPoint( double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double px, double py, double pz) { double ratio = getPointProjectionFactorOnSegmentLine(px, py, pz, sx1, sy1, sz1, sx2, sy2, sz2); if (ratio <= 0.) return FunctionalPoint3D.dist...
java
@Pure public static double distanceSquaredSegmentPoint( double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double px, double py, double pz) { double ratio = getPointProjectionFactorOnSegmentLine(px, py, pz, sx1, sy1, sz1, sx2, sy2, sz2); if (ratio <= 0.) return FunctionalPoint3D.dist...
[ "@", "Pure", "public", "static", "double", "distanceSquaredSegmentPoint", "(", "double", "sx1", ",", "double", "sy1", ",", "double", "sz1", ",", "double", "sx2", ",", "double", "sy2", ",", "double", "sz2", ",", "double", "px", ",", "double", "py", ",", "...
Compute and replies the perpendicular squared distance from a point to a segment. @param sx1 is the X coord of the first point of the segment @param sy1 is the Y coord of the first point of the segment @param sz1 is the Z coord of the first point of the segment @param sx2 is the X coord of the second point of the segm...
[ "Compute", "and", "replies", "the", "perpendicular", "squared", "distance", "from", "a", "point", "to", "a", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L800-L817
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceSegmentPoint
@Pure public static double distanceSegmentPoint( double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double px, double py, double pz) { double ratio = getPointProjectionFactorOnSegmentLine(px, py, pz, sx1, sy1, sz1, sx2, sy2, sz2); if (ratio <= 0.) return FunctionalPoint3D.distancePoi...
java
@Pure public static double distanceSegmentPoint( double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double px, double py, double pz) { double ratio = getPointProjectionFactorOnSegmentLine(px, py, pz, sx1, sy1, sz1, sx2, sy2, sz2); if (ratio <= 0.) return FunctionalPoint3D.distancePoi...
[ "@", "Pure", "public", "static", "double", "distanceSegmentPoint", "(", "double", "sx1", ",", "double", "sy1", ",", "double", "sz1", ",", "double", "sx2", ",", "double", "sy2", ",", "double", "sz2", ",", "double", "px", ",", "double", "py", ",", "double"...
Compute and replies the perpendicular distance from a point to a segment. @param sx1 is the X coord of the first point of the segment @param sy1 is the Y coord of the first point of the segment @param sz1 is the Z coord of the first point of the segment @param sx2 is the X coord of the second point of the segment @par...
[ "Compute", "and", "replies", "the", "perpendicular", "distance", "from", "a", "point", "to", "a", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L929-L946
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.getPointProjectionFactorOnSegmentLine
@Pure public static double getPointProjectionFactorOnSegmentLine( double px, double py, double pz, double s1x, double s1y, double s1z, double s2x, double s2y, double s2z) { double dx = s2x - s1x; double dy = s2y - s1y; double dz = s2z - s1z; if (dx == 0. && dy == 0. && dz == 0.) return 0.; retu...
java
@Pure public static double getPointProjectionFactorOnSegmentLine( double px, double py, double pz, double s1x, double s1y, double s1z, double s2x, double s2y, double s2z) { double dx = s2x - s1x; double dy = s2y - s1y; double dz = s2z - s1z; if (dx == 0. && dy == 0. && dz == 0.) return 0.; retu...
[ "@", "Pure", "public", "static", "double", "getPointProjectionFactorOnSegmentLine", "(", "double", "px", ",", "double", "py", ",", "double", "pz", ",", "double", "s1x", ",", "double", "s1y", ",", "double", "s1z", ",", "double", "s2x", ",", "double", "s2y", ...
Replies the projection a point on a segment. @param px is the coordiante of the point to project @param py is the coordiante of the point to project @param pz is the coordiante of the point to project @param s1x is the x-coordinate of the first line point. @param s1y is the y-coordinate of the first line point. @param...
[ "Replies", "the", "projection", "a", "point", "on", "a", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L1015-L1028
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceSegmentSegment
@Pure public static double distanceSegmentSegment( double ax1, double ay1, double az1, double ax2, double ay2, double az2, double bx1, double by1, double bz1, double bx2, double by2, double bz2) { return Math.sqrt(distanceSquaredSegmentSegment( ax1, ay1, az1, ax2, ay2, az2, bx1, by1, bz1, bx2, by2, bz2...
java
@Pure public static double distanceSegmentSegment( double ax1, double ay1, double az1, double ax2, double ay2, double az2, double bx1, double by1, double bz1, double bx2, double by2, double bz2) { return Math.sqrt(distanceSquaredSegmentSegment( ax1, ay1, az1, ax2, ay2, az2, bx1, by1, bz1, bx2, by2, bz2...
[ "@", "Pure", "public", "static", "double", "distanceSegmentSegment", "(", "double", "ax1", ",", "double", "ay1", ",", "double", "az1", ",", "double", "ax2", ",", "double", "ay2", ",", "double", "az2", ",", "double", "bx1", ",", "double", "by1", ",", "dou...
Compute and replies the distance between two segments. @param ax1 is the X coord of the first point of the first segment @param ay1 is the Y coord of the first point of the first segment @param az1 is the Z coord of the first point of the first segment @param ax2 is the X coord of the second point of the first segment...
[ "Compute", "and", "replies", "the", "distance", "between", "two", "segments", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L1060-L1067
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceSquaredSegmentSegment
@Pure public static double distanceSquaredSegmentSegment( double ax1, double ay1, double az1, double ax2, double ay2, double az2, double bx1, double by1, double bz1, double bx2, double by2, double bz2) { Vector3f u = new Vector3f(ax2 - ax1, ay2 - ay1, az2 - az1); Vector3f v = new Vector3f(bx2 - bx1, by2 - by...
java
@Pure public static double distanceSquaredSegmentSegment( double ax1, double ay1, double az1, double ax2, double ay2, double az2, double bx1, double by1, double bz1, double bx2, double by2, double bz2) { Vector3f u = new Vector3f(ax2 - ax1, ay2 - ay1, az2 - az1); Vector3f v = new Vector3f(bx2 - bx1, by2 - by...
[ "@", "Pure", "public", "static", "double", "distanceSquaredSegmentSegment", "(", "double", "ax1", ",", "double", "ay1", ",", "double", "az1", ",", "double", "ax2", ",", "double", "ay2", ",", "double", "az2", ",", "double", "bx1", ",", "double", "by1", ",",...
Compute and replies the squared distance between two segments. @param ax1 is the X coord of the first point of the first segment @param ay1 is the Y coord of the first point of the first segment @param az1 is the Z coord of the first point of the first segment @param ax2 is the X coord of the second point of the first...
[ "Compute", "and", "replies", "the", "squared", "distance", "between", "two", "segments", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L1098-L1183
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceSegment
@Pure public double distanceSegment(Point3D point) { return distanceSegmentPoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
java
@Pure public double distanceSegment(Point3D point) { return distanceSegmentPoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
[ "@", "Pure", "public", "double", "distanceSegment", "(", "Point3D", "point", ")", "{", "return", "distanceSegmentPoint", "(", "getX1", "(", ")", ",", "getY1", "(", ")", ",", "getZ1", "(", ")", ",", "getX2", "(", ")", ",", "getY2", "(", ")", ",", "get...
Replies the distance between this segment and the given point. @param point @return the distance.
[ "Replies", "the", "distance", "between", "this", "segment", "and", "the", "given", "point", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L1409-L1415
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceLine
@Pure public double distanceLine(Point3D point) { return distanceLinePoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
java
@Pure public double distanceLine(Point3D point) { return distanceLinePoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
[ "@", "Pure", "public", "double", "distanceLine", "(", "Point3D", "point", ")", "{", "return", "distanceLinePoint", "(", "getX1", "(", ")", ",", "getY1", "(", ")", ",", "getZ1", "(", ")", ",", "getX2", "(", ")", ",", "getY2", "(", ")", ",", "getZ2", ...
Replies the distance between the line of this segment and the given point. @param point @return the distance.
[ "Replies", "the", "distance", "between", "the", "line", "of", "this", "segment", "and", "the", "given", "point", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L1422-L1428
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceSquaredSegment
@Pure public double distanceSquaredSegment(Point3D point) { return distanceSquaredSegmentPoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
java
@Pure public double distanceSquaredSegment(Point3D point) { return distanceSquaredSegmentPoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
[ "@", "Pure", "public", "double", "distanceSquaredSegment", "(", "Point3D", "point", ")", "{", "return", "distanceSquaredSegmentPoint", "(", "getX1", "(", ")", ",", "getY1", "(", ")", ",", "getZ1", "(", ")", ",", "getX2", "(", ")", ",", "getY2", "(", ")",...
Replies the squared distance between this segment and the given point. @param point @return the squared distance.
[ "Replies", "the", "squared", "distance", "between", "this", "segment", "and", "the", "given", "point", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L1435-L1441
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java
AbstractSegment3F.distanceSquaredLine
@Pure public double distanceSquaredLine(Point3D point) { return distanceSquaredLinePoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
java
@Pure public double distanceSquaredLine(Point3D point) { return distanceSquaredLinePoint( getX1(), getY1(), getZ1(), getX2(), getY2(), getZ2(), point.getX(), point.getY(), point.getZ()); }
[ "@", "Pure", "public", "double", "distanceSquaredLine", "(", "Point3D", "point", ")", "{", "return", "distanceSquaredLinePoint", "(", "getX1", "(", ")", ",", "getY1", "(", ")", ",", "getZ1", "(", ")", ",", "getX2", "(", ")", ",", "getY2", "(", ")", ","...
Replies the squared distance between the line of this segment and the given point. @param point @return the squared distance.
[ "Replies", "the", "squared", "distance", "between", "the", "line", "of", "this", "segment", "and", "the", "given", "point", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L1448-L1454
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusNetworkLayer.java
BusNetworkLayer.onBusLineAdded
protected boolean onBusLineAdded(BusLine line, int index) { if (this.autoUpdate.get()) { try { addMapLayer(index, new BusLineLayer(line, isLayerAutoUpdated())); return true; } catch (Throwable exception) { // } } return false; }
java
protected boolean onBusLineAdded(BusLine line, int index) { if (this.autoUpdate.get()) { try { addMapLayer(index, new BusLineLayer(line, isLayerAutoUpdated())); return true; } catch (Throwable exception) { // } } return false; }
[ "protected", "boolean", "onBusLineAdded", "(", "BusLine", "line", ",", "int", "index", ")", "{", "if", "(", "this", ".", "autoUpdate", ".", "get", "(", ")", ")", "{", "try", "{", "addMapLayer", "(", "index", ",", "new", "BusLineLayer", "(", "line", ","...
Invoked when a bus line was added in the attached network. <p>This function exists to allow be override to provide a specific behaviour when a bus line has been added. @param line is the new line. @param index is the index of the bus line. @return <code>true</code> if the events was fired, otherwise <code>false</code...
[ "Invoked", "when", "a", "bus", "line", "was", "added", "in", "the", "attached", "network", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusNetworkLayer.java#L264-L274
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusNetworkLayer.java
BusNetworkLayer.onBusLineRemoved
protected boolean onBusLineRemoved(BusLine line, int index) { if (this.autoUpdate.get()) { try { removeMapLayerAt(index); return true; } catch (Throwable exception) { // } } return false; }
java
protected boolean onBusLineRemoved(BusLine line, int index) { if (this.autoUpdate.get()) { try { removeMapLayerAt(index); return true; } catch (Throwable exception) { // } } return false; }
[ "protected", "boolean", "onBusLineRemoved", "(", "BusLine", "line", ",", "int", "index", ")", "{", "if", "(", "this", ".", "autoUpdate", ".", "get", "(", ")", ")", "{", "try", "{", "removeMapLayerAt", "(", "index", ")", ";", "return", "true", ";", "}",...
Invoked when a bus line was removed from the attached network. <p>This function exists to allow be override to provide a specific behaviour when a bus line has been removed. @param line is the removed line. @param index is the index of the bus line. @return <code>true</code> if the events was fired, otherwise <code>f...
[ "Invoked", "when", "a", "bus", "line", "was", "removed", "from", "the", "attached", "network", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusNetworkLayer.java#L285-L295
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/KeyValueSources.java
KeyValueSources.fromFileMap
@Nonnull public static ImmutableKeyValueSource<Symbol, ByteSource> fromFileMap( final Map<Symbol, File> fileMap) { return new FileMapKeyToByteSource(fileMap); }
java
@Nonnull public static ImmutableKeyValueSource<Symbol, ByteSource> fromFileMap( final Map<Symbol, File> fileMap) { return new FileMapKeyToByteSource(fileMap); }
[ "@", "Nonnull", "public", "static", "ImmutableKeyValueSource", "<", "Symbol", ",", "ByteSource", ">", "fromFileMap", "(", "final", "Map", "<", "Symbol", ",", "File", ">", "fileMap", ")", "{", "return", "new", "FileMapKeyToByteSource", "(", "fileMap", ")", ";",...
Creates a new key-value source based on the contents of the specified symbol to file map.
[ "Creates", "a", "new", "key", "-", "value", "source", "based", "on", "the", "contents", "of", "the", "specified", "symbol", "to", "file", "map", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/KeyValueSources.java#L35-L39
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/KeyValueSources.java
KeyValueSources.fromPalDB
@Nonnull public static ImmutableKeyValueSource<Symbol, ByteSource> fromPalDB(final File dbFile) throws IOException { return PalDBKeyValueSource.fromFile(dbFile); }
java
@Nonnull public static ImmutableKeyValueSource<Symbol, ByteSource> fromPalDB(final File dbFile) throws IOException { return PalDBKeyValueSource.fromFile(dbFile); }
[ "@", "Nonnull", "public", "static", "ImmutableKeyValueSource", "<", "Symbol", ",", "ByteSource", ">", "fromPalDB", "(", "final", "File", "dbFile", ")", "throws", "IOException", "{", "return", "PalDBKeyValueSource", ".", "fromFile", "(", "dbFile", ")", ";", "}" ]
Creates a new key-value source based on the contents of the specified embedded database. @param dbFile a database file created using {@link KeyValueSinks#forPalDB(File, boolean)} @return a key-value source @throws IOException if the database could not be opened for reading
[ "Creates", "a", "new", "key", "-", "value", "source", "based", "on", "the", "contents", "of", "the", "specified", "embedded", "database", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/KeyValueSources.java#L48-L52
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/panels/tree/JTreePanel.java
JTreePanel.newTree
protected JTree newTree() { JTree tree = new JTree(); tree.setModel(newTreeModel(getModel())); tree.setEditable(true); tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); tree.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) ...
java
protected JTree newTree() { JTree tree = new JTree(); tree.setModel(newTreeModel(getModel())); tree.setEditable(true); tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); tree.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) ...
[ "protected", "JTree", "newTree", "(", ")", "{", "JTree", "tree", "=", "new", "JTree", "(", ")", ";", "tree", ".", "setModel", "(", "newTreeModel", "(", "getModel", "(", ")", ")", ")", ";", "tree", ".", "setEditable", "(", "true", ")", ";", "tree", ...
New tree. @return the j tree
[ "New", "tree", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/panels/tree/JTreePanel.java#L104-L133
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3f.java
Path3f.add
public void add(Iterator<AbstractPathElement3F> iterator) { AbstractPathElement3F element; while (iterator.hasNext()) { element = iterator.next(); switch(element.type) { case MOVE_TO: moveTo(element.getToX(), element.getToY(), element.getToZ()); break; case LINE_TO: lineTo(element.getToX(), ...
java
public void add(Iterator<AbstractPathElement3F> iterator) { AbstractPathElement3F element; while (iterator.hasNext()) { element = iterator.next(); switch(element.type) { case MOVE_TO: moveTo(element.getToX(), element.getToY(), element.getToZ()); break; case LINE_TO: lineTo(element.getToX(), ...
[ "public", "void", "add", "(", "Iterator", "<", "AbstractPathElement3F", ">", "iterator", ")", "{", "AbstractPathElement3F", "element", ";", "while", "(", "iterator", ".", "hasNext", "(", ")", ")", "{", "element", "=", "iterator", ".", "next", "(", ")", ";"...
Add the elements replied by the iterator into this path. @param iterator
[ "Add", "the", "elements", "replied", "by", "the", "iterator", "into", "this", "path", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3f.java#L1756-L1779
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3f.java
Path3f.length
public double length() { if (this.isEmpty()) return 0; double length = 0; PathIterator3f pi = getPathIterator(MathConstants.SPLINE_APPROXIMATION_RATIO); AbstractPathElement3F pathElement = pi.next(); if (pathElement.type != PathElementType.MOVE_TO) { throw new IllegalArgumentException("missi...
java
public double length() { if (this.isEmpty()) return 0; double length = 0; PathIterator3f pi = getPathIterator(MathConstants.SPLINE_APPROXIMATION_RATIO); AbstractPathElement3F pathElement = pi.next(); if (pathElement.type != PathElementType.MOVE_TO) { throw new IllegalArgumentException("missi...
[ "public", "double", "length", "(", ")", "{", "if", "(", "this", ".", "isEmpty", "(", ")", ")", "return", "0", ";", "double", "length", "=", "0", ";", "PathIterator3f", "pi", "=", "getPathIterator", "(", "MathConstants", ".", "SPLINE_APPROXIMATION_RATIO", "...
FIXME TO BE IMPLEMENTED IN POLYLINE
[ "FIXME", "TO", "BE", "IMPLEMENTED", "IN", "POLYLINE" ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3f.java#L1983-L2075
train
BBN-E/bue-common-open
nlp-core-open/src/main/java/com/bbn/nlp/corpora/lightERE/EREtoEDT.java
EREtoEDT.lightEREOffsetToEDTOffset
private ImmutableMap<Integer, Integer> lightEREOffsetToEDTOffset(String document) { final ImmutableMap.Builder<Integer, Integer> offsetMap = ImmutableMap.builder(); int EDT = 0; // lightERE treats these as one, not two (as an XML parser would) document = document.replaceAll("\\r\\n", "\n"); for (int...
java
private ImmutableMap<Integer, Integer> lightEREOffsetToEDTOffset(String document) { final ImmutableMap.Builder<Integer, Integer> offsetMap = ImmutableMap.builder(); int EDT = 0; // lightERE treats these as one, not two (as an XML parser would) document = document.replaceAll("\\r\\n", "\n"); for (int...
[ "private", "ImmutableMap", "<", "Integer", ",", "Integer", ">", "lightEREOffsetToEDTOffset", "(", "String", "document", ")", "{", "final", "ImmutableMap", ".", "Builder", "<", "Integer", ",", "Integer", ">", "offsetMap", "=", "ImmutableMap", ".", "builder", "(",...
lightERE offsets are indexed into the document, including text inside tags EDT offsets are TODO use the mapping in bue-common-open
[ "lightERE", "offsets", "are", "indexed", "into", "the", "document", "including", "text", "inside", "tags", "EDT", "offsets", "are" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/nlp-core-open/src/main/java/com/bbn/nlp/corpora/lightERE/EREtoEDT.java#L242-L258
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/docfilter/IntegerArrayFilter.java
IntegerArrayFilter.validate
protected boolean validate(String text) { try { String[] strings = text.split(","); for (int i = 0; i < strings.length; i++) { Integer.parseInt(strings[i].trim()); } return true; } catch (NumberFormatException e) { return false; } }
java
protected boolean validate(String text) { try { String[] strings = text.split(","); for (int i = 0; i < strings.length; i++) { Integer.parseInt(strings[i].trim()); } return true; } catch (NumberFormatException e) { return false; } }
[ "protected", "boolean", "validate", "(", "String", "text", ")", "{", "try", "{", "String", "[", "]", "strings", "=", "text", ".", "split", "(", "\",\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "strings", ".", "length", ";", "i"...
Validate the given string that it is a int array @param text the text @return true, if successful
[ "Validate", "the", "given", "string", "that", "it", "is", "a", "int", "array" ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/docfilter/IntegerArrayFilter.java#L124-L139
train
BBN-E/bue-common-open
scoring-open/src/main/java/com/bbn/bue/common/evaluation/EquivalenceBasedProvenancedAlignment.java
EquivalenceBasedProvenancedAlignment.getAlignedTo
private Collection<EqClassT> getAlignedTo(final Object item) { if (rightEquivalenceClassesToProvenances.containsKey(item) && leftEquivalenceClassesToProvenances.containsKey(item)) { return ImmutableList.of((EqClassT) item); } else { return ImmutableList.of(); } }
java
private Collection<EqClassT> getAlignedTo(final Object item) { if (rightEquivalenceClassesToProvenances.containsKey(item) && leftEquivalenceClassesToProvenances.containsKey(item)) { return ImmutableList.of((EqClassT) item); } else { return ImmutableList.of(); } }
[ "private", "Collection", "<", "EqClassT", ">", "getAlignedTo", "(", "final", "Object", "item", ")", "{", "if", "(", "rightEquivalenceClassesToProvenances", ".", "containsKey", "(", "item", ")", "&&", "leftEquivalenceClassesToProvenances", ".", "containsKey", "(", "i...
Any equivalence class is by definition aligned to itself if it is present on both the left and the right. Otherwise, it has no alignment.
[ "Any", "equivalence", "class", "is", "by", "definition", "aligned", "to", "itself", "if", "it", "is", "present", "on", "both", "the", "left", "and", "the", "right", ".", "Otherwise", "it", "has", "no", "alignment", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/scoring-open/src/main/java/com/bbn/bue/common/evaluation/EquivalenceBasedProvenancedAlignment.java#L104-L111
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListenerCollection.java
ListenerCollection.add
public synchronized <T extends EventListener> void add(Class<T> type, T listener) { assert listener != null; if (this.listeners == NULL) { // if this is the first listener added, // initialize the lists this.listeners = new Object[] {type, listener}; } else { // Otherwise copy the array and add the ne...
java
public synchronized <T extends EventListener> void add(Class<T> type, T listener) { assert listener != null; if (this.listeners == NULL) { // if this is the first listener added, // initialize the lists this.listeners = new Object[] {type, listener}; } else { // Otherwise copy the array and add the ne...
[ "public", "synchronized", "<", "T", "extends", "EventListener", ">", "void", "add", "(", "Class", "<", "T", ">", "type", ",", "T", "listener", ")", "{", "assert", "listener", "!=", "null", ";", "if", "(", "this", ".", "listeners", "==", "NULL", ")", ...
Adds the listener as a listener of the specified type. @param <T> the type of the listener to be added @param type the type of the listener to be added @param listener the listener to be added
[ "Adds", "the", "listener", "as", "a", "listener", "of", "the", "specified", "type", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListenerCollection.java#L164-L181
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListenerCollection.java
ListenerCollection.remove
public synchronized <T extends EventListener> void remove(Class<T> type, T listener) { assert listener != null; // Is l on the list? int index = -1; for (int i = this.listeners.length - 2; i >= 0; i -= 2) { if ((this.listeners[i] == type) && (this.listeners[i + 1].equals(listener))) { index = i; brea...
java
public synchronized <T extends EventListener> void remove(Class<T> type, T listener) { assert listener != null; // Is l on the list? int index = -1; for (int i = this.listeners.length - 2; i >= 0; i -= 2) { if ((this.listeners[i] == type) && (this.listeners[i + 1].equals(listener))) { index = i; brea...
[ "public", "synchronized", "<", "T", "extends", "EventListener", ">", "void", "remove", "(", "Class", "<", "T", ">", "type", ",", "T", "listener", ")", "{", "assert", "listener", "!=", "null", ";", "// Is l on the list?", "int", "index", "=", "-", "1", ";...
Removes the listener as a listener of the specified type. @param <T> the type of the listener to be removed @param type the type of the listener to be removed @param listener the listener to be removed
[ "Removes", "the", "listener", "as", "a", "listener", "of", "the", "specified", "type", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListenerCollection.java#L190-L216
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListenerCollection.java
ListenerCollection.writeObject
private void writeObject(ObjectOutputStream stream) throws IOException { final Object[] lList = this.listeners; stream.defaultWriteObject(); // Save the non-null event listeners: for (int i = 0; i < lList.length; i += 2) { final Class<?> t = (Class<?>) lList[i]; final EventListener l = (EventListener) lL...
java
private void writeObject(ObjectOutputStream stream) throws IOException { final Object[] lList = this.listeners; stream.defaultWriteObject(); // Save the non-null event listeners: for (int i = 0; i < lList.length; i += 2) { final Class<?> t = (Class<?>) lList[i]; final EventListener l = (EventListener) lL...
[ "private", "void", "writeObject", "(", "ObjectOutputStream", "stream", ")", "throws", "IOException", "{", "final", "Object", "[", "]", "lList", "=", "this", ".", "listeners", ";", "stream", ".", "defaultWriteObject", "(", ")", ";", "// Save the non-null event list...
Serialization support. @param stream the stream. @throws IOException when something wrong occurs.
[ "Serialization", "support", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListenerCollection.java#L223-L238
train
gallandarakhneorg/afc
core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/MathFunctionRange.java
MathFunctionRange.createDiscreteSet
@Pure public static MathFunctionRange[] createDiscreteSet(double... values) { final MathFunctionRange[] bounds = new MathFunctionRange[values.length]; for (int i = 0; i < values.length; ++i) { bounds[i] = new MathFunctionRange(values[i]); } return bounds; }
java
@Pure public static MathFunctionRange[] createDiscreteSet(double... values) { final MathFunctionRange[] bounds = new MathFunctionRange[values.length]; for (int i = 0; i < values.length; ++i) { bounds[i] = new MathFunctionRange(values[i]); } return bounds; }
[ "@", "Pure", "public", "static", "MathFunctionRange", "[", "]", "createDiscreteSet", "(", "double", "...", "values", ")", "{", "final", "MathFunctionRange", "[", "]", "bounds", "=", "new", "MathFunctionRange", "[", "values", ".", "length", "]", ";", "for", "...
Create a set of bounds that correspond to the specified discrete values. @param values are put in there own bounds object @return the set of bounds
[ "Create", "a", "set", "of", "bounds", "that", "correspond", "to", "the", "specified", "discrete", "values", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/MathFunctionRange.java#L85-L92
train
gallandarakhneorg/afc
core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/MathFunctionRange.java
MathFunctionRange.createSet
@Pure public static MathFunctionRange[] createSet(double... values) { final MathFunctionRange[] bounds = new MathFunctionRange[values.length / 2]; for (int i = 0, j = 0; i < values.length; i += 2, ++j) { bounds[j] = new MathFunctionRange(values[i], values[i + 1]); } return bounds; }
java
@Pure public static MathFunctionRange[] createSet(double... values) { final MathFunctionRange[] bounds = new MathFunctionRange[values.length / 2]; for (int i = 0, j = 0; i < values.length; i += 2, ++j) { bounds[j] = new MathFunctionRange(values[i], values[i + 1]); } return bounds; }
[ "@", "Pure", "public", "static", "MathFunctionRange", "[", "]", "createSet", "(", "double", "...", "values", ")", "{", "final", "MathFunctionRange", "[", "]", "bounds", "=", "new", "MathFunctionRange", "[", "values", ".", "length", "/", "2", "]", ";", "for...
Create a set of bounds that correspond to the specified values. <p>The first value is the minimal value of the first bounds, the second value is the maximal value of the first bounds, the third value is the minimal value of the second bounds, the forth value is the maximal value of the second bounds, and so on. @para...
[ "Create", "a", "set", "of", "bounds", "that", "correspond", "to", "the", "specified", "values", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/MathFunctionRange.java#L104-L111
train
qiujuer/OkHttpPacker
okhttp/src/main/java/net/qiujuer/common/okhttp/core/HttpCore.java
HttpCore.interceptToProgressResponse
public Interceptor interceptToProgressResponse() { return new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Response response = chain.proceed(chain.request()); ResponseBody body = new ForwardResponseBody(response.body...
java
public Interceptor interceptToProgressResponse() { return new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Response response = chain.proceed(chain.request()); ResponseBody body = new ForwardResponseBody(response.body...
[ "public", "Interceptor", "interceptToProgressResponse", "(", ")", "{", "return", "new", "Interceptor", "(", ")", "{", "@", "Override", "public", "Response", "intercept", "(", "Chain", "chain", ")", "throws", "IOException", "{", "Response", "response", "=", "chai...
intercept the Response body stream progress
[ "intercept", "the", "Response", "body", "stream", "progress" ]
d2d484facb66b7e11e6cbbfeb78025f76ce25ebd
https://github.com/qiujuer/OkHttpPacker/blob/d2d484facb66b7e11e6cbbfeb78025f76ce25ebd/okhttp/src/main/java/net/qiujuer/common/okhttp/core/HttpCore.java#L86-L97
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/RoadPolyline.java
RoadPolyline.setStartPoint
void setStartPoint(StandardRoadConnection desiredConnection) { final StandardRoadConnection oldPoint = getBeginPoint(StandardRoadConnection.class); if (oldPoint != null) { oldPoint.removeConnectedSegment(this, true); } this.firstConnection = desiredConnection; if (desiredConnection != null) { final Poin...
java
void setStartPoint(StandardRoadConnection desiredConnection) { final StandardRoadConnection oldPoint = getBeginPoint(StandardRoadConnection.class); if (oldPoint != null) { oldPoint.removeConnectedSegment(this, true); } this.firstConnection = desiredConnection; if (desiredConnection != null) { final Poin...
[ "void", "setStartPoint", "(", "StandardRoadConnection", "desiredConnection", ")", "{", "final", "StandardRoadConnection", "oldPoint", "=", "getBeginPoint", "(", "StandardRoadConnection", ".", "class", ")", ";", "if", "(", "oldPoint", "!=", "null", ")", "{", "oldPoin...
Move the start point of a road segment. <p>This function forces the start point of the given segment to correspond to the specified connection point even if the original start point was not near the connection point. @param desiredConnection the connection.
[ "Move", "the", "start", "point", "of", "a", "road", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/RoadPolyline.java#L680-L693
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/RoadPolyline.java
RoadPolyline.setEndPoint
void setEndPoint(StandardRoadConnection desiredConnection) { final StandardRoadConnection oldPoint = getEndPoint(StandardRoadConnection.class); if (oldPoint != null) { oldPoint.removeConnectedSegment(this, false); } this.lastConnection = desiredConnection; if (desiredConnection != null) { final Point2d ...
java
void setEndPoint(StandardRoadConnection desiredConnection) { final StandardRoadConnection oldPoint = getEndPoint(StandardRoadConnection.class); if (oldPoint != null) { oldPoint.removeConnectedSegment(this, false); } this.lastConnection = desiredConnection; if (desiredConnection != null) { final Point2d ...
[ "void", "setEndPoint", "(", "StandardRoadConnection", "desiredConnection", ")", "{", "final", "StandardRoadConnection", "oldPoint", "=", "getEndPoint", "(", "StandardRoadConnection", ".", "class", ")", ";", "if", "(", "oldPoint", "!=", "null", ")", "{", "oldPoint", ...
Move the end point of a road segment. <p>This function forces the end point of the given segment to correspond to the specified connection point even if the original end point was not near the connection point. @param desiredConnection the connection.
[ "Move", "the", "end", "point", "of", "a", "road", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/RoadPolyline.java#L705-L718
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/PartitionData.java
PartitionData.filterMapToKeysPreservingOrder
private static <K, V> ImmutableMap<K, V> filterMapToKeysPreservingOrder( final ImmutableMap<? extends K, ? extends V> map, Iterable<? extends K> keys) { final ImmutableMap.Builder<K, V> ret = ImmutableMap.builder(); for (final K key : keys) { final V value = map.get(key); checkArgument(value !...
java
private static <K, V> ImmutableMap<K, V> filterMapToKeysPreservingOrder( final ImmutableMap<? extends K, ? extends V> map, Iterable<? extends K> keys) { final ImmutableMap.Builder<K, V> ret = ImmutableMap.builder(); for (final K key : keys) { final V value = map.get(key); checkArgument(value !...
[ "private", "static", "<", "K", ",", "V", ">", "ImmutableMap", "<", "K", ",", "V", ">", "filterMapToKeysPreservingOrder", "(", "final", "ImmutableMap", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "map", ",", "Iterable", "<", "?", "extends", ...
Filters a map down to the specified keys such that the new map has the same iteration order as the specified keys.
[ "Filters", "a", "map", "down", "to", "the", "specified", "keys", "such", "that", "the", "new", "map", "has", "the", "same", "iteration", "order", "as", "the", "specified", "keys", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/PartitionData.java#L252-L261
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java
AwtExtensions.getRootJDialog
public static Component getRootJDialog(Component component) { while (null != component.getParent()) { component = component.getParent(); if (component instanceof JDialog) { break; } } return component; }
java
public static Component getRootJDialog(Component component) { while (null != component.getParent()) { component = component.getParent(); if (component instanceof JDialog) { break; } } return component; }
[ "public", "static", "Component", "getRootJDialog", "(", "Component", "component", ")", "{", "while", "(", "null", "!=", "component", ".", "getParent", "(", ")", ")", "{", "component", "=", "component", ".", "getParent", "(", ")", ";", "if", "(", "component...
Gets the root JDialog from the given Component Object. @param component The Component to find the root JDialog. @return 's the root JDialog.
[ "Gets", "the", "root", "JDialog", "from", "the", "given", "Component", "Object", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java#L58-L69
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java
AwtExtensions.getRootJFrame
public static Component getRootJFrame(Component component) { while (null != component.getParent()) { component = component.getParent(); if (component instanceof JFrame) { break; } } return component; }
java
public static Component getRootJFrame(Component component) { while (null != component.getParent()) { component = component.getParent(); if (component instanceof JFrame) { break; } } return component; }
[ "public", "static", "Component", "getRootJFrame", "(", "Component", "component", ")", "{", "while", "(", "null", "!=", "component", ".", "getParent", "(", ")", ")", "{", "component", "=", "component", ".", "getParent", "(", ")", ";", "if", "(", "component"...
Gets the root JFrame from the given Component Object. @param component The Component to find the root JFrame. @return 's the root JFrame.
[ "Gets", "the", "root", "JFrame", "from", "the", "given", "Component", "Object", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java#L78-L89
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java
AwtExtensions.getRootParent
public static Component getRootParent(Component component) { while (null != component.getParent()) { component = component.getParent(); } return component; }
java
public static Component getRootParent(Component component) { while (null != component.getParent()) { component = component.getParent(); } return component; }
[ "public", "static", "Component", "getRootParent", "(", "Component", "component", ")", "{", "while", "(", "null", "!=", "component", ".", "getParent", "(", ")", ")", "{", "component", "=", "component", ".", "getParent", "(", ")", ";", "}", "return", "compon...
Gets the root parent from the given Component Object. @param component The Component to find the root parent. @return 's the root parent.
[ "Gets", "the", "root", "parent", "from", "the", "given", "Component", "Object", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java#L98-L105
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java
AwtExtensions.setIconImage
public static void setIconImage(final String resourceName, final Window window) throws IOException { final InputStream isLogo = ClassExtensions.getResourceAsStream(resourceName); final BufferedImage biLogo = ImageIO.read(isLogo); window.setIconImage(biLogo); }
java
public static void setIconImage(final String resourceName, final Window window) throws IOException { final InputStream isLogo = ClassExtensions.getResourceAsStream(resourceName); final BufferedImage biLogo = ImageIO.read(isLogo); window.setIconImage(biLogo); }
[ "public", "static", "void", "setIconImage", "(", "final", "String", "resourceName", ",", "final", "Window", "window", ")", "throws", "IOException", "{", "final", "InputStream", "isLogo", "=", "ClassExtensions", ".", "getResourceAsStream", "(", "resourceName", ")", ...
Sets the icon image from the given resource name and add it to the given window object. @param resourceName The name from the resource. This includes the absolute path to the image icon from the classpath. @param window the window in which to set the icon image. @throws IOException Signals that an I/O exception has oc...
[ "Sets", "the", "icon", "image", "from", "the", "given", "resource", "name", "and", "add", "it", "to", "the", "given", "window", "object", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/utils/AwtExtensions.java#L153-L159
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapCircle.java
MapCircle.getDistance
@Override @Pure public double getDistance(Point2D<?, ?> point) { double dist = super.getDistance(point); dist -= this.radius; return dist; }
java
@Override @Pure public double getDistance(Point2D<?, ?> point) { double dist = super.getDistance(point); dist -= this.radius; return dist; }
[ "@", "Override", "@", "Pure", "public", "double", "getDistance", "(", "Point2D", "<", "?", ",", "?", ">", "point", ")", "{", "double", "dist", "=", "super", ".", "getDistance", "(", "point", ")", ";", "dist", "-=", "this", ".", "radius", ";", "return...
Replies the distance between this MapCircle and point. @param point the point to compute the distance to. @return the distance. Should be negative if the point is inside the circle.
[ "Replies", "the", "distance", "between", "this", "MapCircle", "and", "point", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapCircle.java#L309-L315
train
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/Point3dfx.java
Point3dfx.convert
public static Point3dfx convert(Tuple3D<?> tuple) { if (tuple instanceof Point3dfx) { return (Point3dfx) tuple; } return new Point3dfx(tuple.getX(), tuple.getY(), tuple.getZ()); }
java
public static Point3dfx convert(Tuple3D<?> tuple) { if (tuple instanceof Point3dfx) { return (Point3dfx) tuple; } return new Point3dfx(tuple.getX(), tuple.getY(), tuple.getZ()); }
[ "public", "static", "Point3dfx", "convert", "(", "Tuple3D", "<", "?", ">", "tuple", ")", "{", "if", "(", "tuple", "instanceof", "Point3dfx", ")", "{", "return", "(", "Point3dfx", ")", "tuple", ";", "}", "return", "new", "Point3dfx", "(", "tuple", ".", ...
Convert the given tuple to a real Point3dfx. <p>If the given tuple is already a Point3dfx, it is replied. @param tuple the tuple. @return the Point3dfx. @since 14.0
[ "Convert", "the", "given", "tuple", "to", "a", "real", "Point3dfx", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/Point3dfx.java#L126-L131
train
BBN-E/bue-common-open
nlp-core-open/src/main/java/com/bbn/nlp/corpora/ere/ERELoader.java
ERELoading.fetch
@SuppressWarnings({"TypeParameterUnusedInFormals", "unchecked"}) private <T> T fetch(final String id) { checkNotNull(id); checkArgument(!id.isEmpty()); final T ret = (T) idMap.get(id); if (ret == null) { throw new EREException(String.format("Lookup failed for id %s.", id)); } return ret;...
java
@SuppressWarnings({"TypeParameterUnusedInFormals", "unchecked"}) private <T> T fetch(final String id) { checkNotNull(id); checkArgument(!id.isEmpty()); final T ret = (T) idMap.get(id); if (ret == null) { throw new EREException(String.format("Lookup failed for id %s.", id)); } return ret;...
[ "@", "SuppressWarnings", "(", "{", "\"TypeParameterUnusedInFormals\"", ",", "\"unchecked\"", "}", ")", "private", "<", "T", ">", "T", "fetch", "(", "final", "String", "id", ")", "{", "checkNotNull", "(", "id", ")", ";", "checkArgument", "(", "!", "id", "."...
no way around unchecked cast for heterogeneous container
[ "no", "way", "around", "unchecked", "cast", "for", "heterogeneous", "container" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/nlp-core-open/src/main/java/com/bbn/nlp/corpora/ere/ERELoader.java#L429-L438
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/StringEscaper.java
StringEscaper.setSpecialChars
public void setSpecialChars(String[][] chars) { assert chars != null : AssertMessages.notNullParameter(); this.specialChars.clear(); for (final String[] pair : chars) { assert pair != null; assert pair.length == 2; assert pair[0].length() > 0; assert pair[1].length() > 0; this.specialChars.put(pair...
java
public void setSpecialChars(String[][] chars) { assert chars != null : AssertMessages.notNullParameter(); this.specialChars.clear(); for (final String[] pair : chars) { assert pair != null; assert pair.length == 2; assert pair[0].length() > 0; assert pair[1].length() > 0; this.specialChars.put(pair...
[ "public", "void", "setSpecialChars", "(", "String", "[", "]", "[", "]", "chars", ")", "{", "assert", "chars", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", ")", ";", "this", ".", "specialChars", ".", "clear", "(", ")", ";", "for", ...
Change the special characters. <p>The given table is an array of string pairs. The first element of each pair is the string of characters to replace. The second element of each pair is the replacement string of characters. @param chars the translation table.
[ "Change", "the", "special", "characters", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/StringEscaper.java#L114-L124
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/StringEscaper.java
StringEscaper.setValidCharRange
public void setValidCharRange(int minValidChar, int maxValidChar) { if (minValidChar <= maxValidChar) { this.minValidChar = minValidChar; this.maxValidChar = maxValidChar; } else { this.maxValidChar = minValidChar; this.minValidChar = maxValidChar; } }
java
public void setValidCharRange(int minValidChar, int maxValidChar) { if (minValidChar <= maxValidChar) { this.minValidChar = minValidChar; this.maxValidChar = maxValidChar; } else { this.maxValidChar = minValidChar; this.minValidChar = maxValidChar; } }
[ "public", "void", "setValidCharRange", "(", "int", "minValidChar", ",", "int", "maxValidChar", ")", "{", "if", "(", "minValidChar", "<=", "maxValidChar", ")", "{", "this", ".", "minValidChar", "=", "minValidChar", ";", "this", ".", "maxValidChar", "=", "maxVal...
Change the range of the valid characters that should not be escaped. Any character outside the given range is automatically escaped. <p>If {@code maxValidChar} is lower or equal to zero, the invalid characters are not put within the result of the escaping. @param minValidChar the code of the minimal valid character. ...
[ "Change", "the", "range", "of", "the", "valid", "characters", "that", "should", "not", "be", "escaped", ".", "Any", "character", "outside", "the", "given", "range", "is", "automatically", "escaped", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/StringEscaper.java#L135-L143
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/StringEscaper.java
StringEscaper.escape
@SuppressWarnings("checkstyle:magicnumber") public String escape(CharSequence text) { final StringBuilder result = new StringBuilder(); for (int i = 0; i < text.length(); ++i) { final char c = text.charAt(i); final String cs = Character.toString(c); if (this.escapeCharacters.contains(cs)) { // Escape...
java
@SuppressWarnings("checkstyle:magicnumber") public String escape(CharSequence text) { final StringBuilder result = new StringBuilder(); for (int i = 0; i < text.length(); ++i) { final char c = text.charAt(i); final String cs = Character.toString(c); if (this.escapeCharacters.contains(cs)) { // Escape...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "public", "String", "escape", "(", "CharSequence", "text", ")", "{", "final", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Escape the given text. @param text is the text to convert. @return the Java string for the text.
[ "Escape", "the", "given", "text", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/StringEscaper.java#L150-L178
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/primitives/IntUtils.java
IntUtils.shuffle
public static void shuffle(final int[] arr, final Random rng) { // Fisher-Yates shuffle for (int i = arr.length; i > 1; i--) { // swap i-1 and a random spot final int a = i - 1; final int b = rng.nextInt(i); final int tmp = arr[b]; arr[b] = arr[a]; arr[a] = tmp; } }
java
public static void shuffle(final int[] arr, final Random rng) { // Fisher-Yates shuffle for (int i = arr.length; i > 1; i--) { // swap i-1 and a random spot final int a = i - 1; final int b = rng.nextInt(i); final int tmp = arr[b]; arr[b] = arr[a]; arr[a] = tmp; } }
[ "public", "static", "void", "shuffle", "(", "final", "int", "[", "]", "arr", ",", "final", "Random", "rng", ")", "{", "// Fisher-Yates shuffle", "for", "(", "int", "i", "=", "arr", ".", "length", ";", "i", ">", "1", ";", "i", "--", ")", "{", "// sw...
Fisher-Yates suffer a primitive int array
[ "Fisher", "-", "Yates", "suffer", "a", "primitive", "int", "array" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/primitives/IntUtils.java#L28-L39
train
gallandarakhneorg/afc
advanced/gis/gisroadfx/src/main/java/org/arakhne/afc/gis/road/ui/drawers/RoadPolylineDrawer.java
RoadPolylineDrawer.setupRoadBorders
protected void setupRoadBorders(ZoomableGraphicsContext gc, RoadPolyline element) { final Color color = gc.rgb(getDrawingColor(element)); gc.setStroke(color); final double width; if (element.isWidePolyline()) { width = 2 + gc.doc2fxSize(element.getWidth()); } else { width = 3; } gc.setLineWidthInPix...
java
protected void setupRoadBorders(ZoomableGraphicsContext gc, RoadPolyline element) { final Color color = gc.rgb(getDrawingColor(element)); gc.setStroke(color); final double width; if (element.isWidePolyline()) { width = 2 + gc.doc2fxSize(element.getWidth()); } else { width = 3; } gc.setLineWidthInPix...
[ "protected", "void", "setupRoadBorders", "(", "ZoomableGraphicsContext", "gc", ",", "RoadPolyline", "element", ")", "{", "final", "Color", "color", "=", "gc", ".", "rgb", "(", "getDrawingColor", "(", "element", ")", ")", ";", "gc", ".", "setStroke", "(", "co...
Setup for drawing the road borders. @param gc the graphics context. @param element the element to draw.
[ "Setup", "for", "drawing", "the", "road", "borders", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroadfx/src/main/java/org/arakhne/afc/gis/road/ui/drawers/RoadPolylineDrawer.java#L86-L96
train
gallandarakhneorg/afc
advanced/gis/gisroadfx/src/main/java/org/arakhne/afc/gis/road/ui/drawers/RoadPolylineDrawer.java
RoadPolylineDrawer.setupRoadInterior
protected void setupRoadInterior(ZoomableGraphicsContext gc, RoadPolyline element) { final Color color; if (isSelected(element)) { color = gc.rgb(SELECTED_ROAD_COLOR); } else { color = gc.rgb(ROAD_COLOR); } gc.setStroke(color); if (element.isWidePolyline()) { gc.setLineWidthInMeters(element.getWidt...
java
protected void setupRoadInterior(ZoomableGraphicsContext gc, RoadPolyline element) { final Color color; if (isSelected(element)) { color = gc.rgb(SELECTED_ROAD_COLOR); } else { color = gc.rgb(ROAD_COLOR); } gc.setStroke(color); if (element.isWidePolyline()) { gc.setLineWidthInMeters(element.getWidt...
[ "protected", "void", "setupRoadInterior", "(", "ZoomableGraphicsContext", "gc", ",", "RoadPolyline", "element", ")", "{", "final", "Color", "color", ";", "if", "(", "isSelected", "(", "element", ")", ")", "{", "color", "=", "gc", ".", "rgb", "(", "SELECTED_R...
Setup for drawing the road interior. @param gc the graphics context. @param element the element to draw.
[ "Setup", "for", "drawing", "the", "road", "interior", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroadfx/src/main/java/org/arakhne/afc/gis/road/ui/drawers/RoadPolylineDrawer.java#L103-L116
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.lowerEqualParameter
@Pure public static String lowerEqualParameter(int aindex, Object avalue, Object value) { return msg("A11", aindex, avalue, value); //$NON-NLS-1$ }
java
@Pure public static String lowerEqualParameter(int aindex, Object avalue, Object value) { return msg("A11", aindex, avalue, value); //$NON-NLS-1$ }
[ "@", "Pure", "public", "static", "String", "lowerEqualParameter", "(", "int", "aindex", ",", "Object", "avalue", ",", "Object", "value", ")", "{", "return", "msg", "(", "\"A11\"", ",", "aindex", ",", "avalue", ",", "value", ")", ";", "//$NON-NLS-1$", "}" ]
Parameter A must be lower than or equal to the given value. @param aindex the index of the parameter A. @param avalue the value of the parameter A. @param value the value. @return the error message.
[ "Parameter", "A", "must", "be", "lower", "than", "or", "equal", "to", "the", "given", "value", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L126-L129
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.lowerEqualParameters
@Pure public static String lowerEqualParameters(int aindex, Object avalue, int bindex, Object bvalue) { return msg("A3", aindex, avalue, bindex, bvalue); //$NON-NLS-1$ }
java
@Pure public static String lowerEqualParameters(int aindex, Object avalue, int bindex, Object bvalue) { return msg("A3", aindex, avalue, bindex, bvalue); //$NON-NLS-1$ }
[ "@", "Pure", "public", "static", "String", "lowerEqualParameters", "(", "int", "aindex", ",", "Object", "avalue", ",", "int", "bindex", ",", "Object", "bvalue", ")", "{", "return", "msg", "(", "\"A3\"", ",", "aindex", ",", "avalue", ",", "bindex", ",", "...
Parameter A must be lower than or equal to Parameter B. @param aindex the index of the parameter A. @param avalue the value of the parameter A. @param bindex the index of the parameter B. @param bvalue the value of the parameter B. @return the error message.
[ "Parameter", "A", "must", "be", "lower", "than", "or", "equal", "to", "Parameter", "B", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L139-L142
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.outsideRangeInclusiveParameter
@Pure public static String outsideRangeInclusiveParameter(int parameterIndex, Object currentValue, Object minValue, Object maxValue) { return msg("A6", parameterIndex, currentValue, minValue, maxValue); //$NON-NLS-1$ }
java
@Pure public static String outsideRangeInclusiveParameter(int parameterIndex, Object currentValue, Object minValue, Object maxValue) { return msg("A6", parameterIndex, currentValue, minValue, maxValue); //$NON-NLS-1$ }
[ "@", "Pure", "public", "static", "String", "outsideRangeInclusiveParameter", "(", "int", "parameterIndex", ",", "Object", "currentValue", ",", "Object", "minValue", ",", "Object", "maxValue", ")", "{", "return", "msg", "(", "\"A6\"", ",", "parameterIndex", ",", ...
Value is outside range. @param parameterIndex the index of the formal parameter. @param currentValue current value. @param minValue minimum value in range. @param maxValue maximum value in range. @return the error message.
[ "Value", "is", "outside", "range", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L237-L241
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.outsideRangeInclusiveParameter
@Pure @Inline(value = "AssertMessages.outsideRangeInclusiveParameter(0, $1, $2, $3)", imported = {AssertMessages.class}) public static String outsideRangeInclusiveParameter(Object currentValue, Object minValue, Object maxValue) { return outsideRangeInclusiveParameter(0, currentValue, minValue, maxValue); }
java
@Pure @Inline(value = "AssertMessages.outsideRangeInclusiveParameter(0, $1, $2, $3)", imported = {AssertMessages.class}) public static String outsideRangeInclusiveParameter(Object currentValue, Object minValue, Object maxValue) { return outsideRangeInclusiveParameter(0, currentValue, minValue, maxValue); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"AssertMessages.outsideRangeInclusiveParameter(0, $1, $2, $3)\"", ",", "imported", "=", "{", "AssertMessages", ".", "class", "}", ")", "public", "static", "String", "outsideRangeInclusiveParameter", "(", "Object", "curren...
First parameter value is outside range. @param currentValue current value. @param minValue minimum value in range. @param maxValue maximum value in range. @return the error message.
[ "First", "parameter", "value", "is", "outside", "range", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L250-L255
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.tooSmallArrayParameter
@Pure @Inline(value = "AssertMessages.tooSmallArrayParameter(0, $1, $2)", imported = {AssertMessages.class}) public static String tooSmallArrayParameter(int currentSize, int expectedSize) { return tooSmallArrayParameter(0, currentSize, expectedSize); }
java
@Pure @Inline(value = "AssertMessages.tooSmallArrayParameter(0, $1, $2)", imported = {AssertMessages.class}) public static String tooSmallArrayParameter(int currentSize, int expectedSize) { return tooSmallArrayParameter(0, currentSize, expectedSize); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"AssertMessages.tooSmallArrayParameter(0, $1, $2)\"", ",", "imported", "=", "{", "AssertMessages", ".", "class", "}", ")", "public", "static", "String", "tooSmallArrayParameter", "(", "int", "currentSize", ",", "int",...
Size of the first array parameter is too small. @param currentSize current size of the array. @param expectedSize expected size. @return the error message.
[ "Size", "of", "the", "first", "array", "parameter", "is", "too", "small", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L303-L307
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.tooSmallArrayParameter
@Pure public static String tooSmallArrayParameter(int parameterIndex, int currentSize, int expectedSize) { return msg("A5", parameterIndex, currentSize, expectedSize); //$NON-NLS-1$ }
java
@Pure public static String tooSmallArrayParameter(int parameterIndex, int currentSize, int expectedSize) { return msg("A5", parameterIndex, currentSize, expectedSize); //$NON-NLS-1$ }
[ "@", "Pure", "public", "static", "String", "tooSmallArrayParameter", "(", "int", "parameterIndex", ",", "int", "currentSize", ",", "int", "expectedSize", ")", "{", "return", "msg", "(", "\"A5\"", ",", "parameterIndex", ",", "currentSize", ",", "expectedSize", ")...
Size of the array parameter is too small. @param parameterIndex the index of the formal parameter. @param currentSize current size of the array. @param expectedSize expected size. @return the error message.
[ "Size", "of", "the", "array", "parameter", "is", "too", "small", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L316-L319
train
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileWriter.java
GISShapeFileWriter.toESRI
@Pure public static ShapeElementType toESRI(Class<? extends MapElement> type) { if (MapPolyline.class.isAssignableFrom(type)) { return ShapeElementType.POLYLINE; } if (MapPolygon.class.isAssignableFrom(type)) { return ShapeElementType.POLYGON; } if (MapMultiPoint.class.isAssignableFrom(type)) { retu...
java
@Pure public static ShapeElementType toESRI(Class<? extends MapElement> type) { if (MapPolyline.class.isAssignableFrom(type)) { return ShapeElementType.POLYLINE; } if (MapPolygon.class.isAssignableFrom(type)) { return ShapeElementType.POLYGON; } if (MapMultiPoint.class.isAssignableFrom(type)) { retu...
[ "@", "Pure", "public", "static", "ShapeElementType", "toESRI", "(", "Class", "<", "?", "extends", "MapElement", ">", "type", ")", "{", "if", "(", "MapPolyline", ".", "class", ".", "isAssignableFrom", "(", "type", ")", ")", "{", "return", "ShapeElementType", ...
Replies the type of map element which is corresponding to the given GIS class. @param type the type of element. @return the type of map element. @throws IllegalArgumentException if the given type is not supported by the I/O API. @since 4.0
[ "Replies", "the", "type", "of", "map", "element", "which", "is", "corresponding", "to", "the", "given", "GIS", "class", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileWriter.java#L342-L357
train
BBN-E/bue-common-open
scoring-open/src/main/java/com/bbn/bue/common/evaluation/Alignments.java
Alignments.splitAlignmentByKeyFunction
@SuppressWarnings("unchecked") public static <T, V> ImmutableMap<V, Alignment<T, T>> splitAlignmentByKeyFunction( Alignment<? extends T, ? extends T> alignment, Function<? super T, ? extends V> keyFunction) { // we first determine all keys we could ever encounter to ensure we can construct our map ...
java
@SuppressWarnings("unchecked") public static <T, V> ImmutableMap<V, Alignment<T, T>> splitAlignmentByKeyFunction( Alignment<? extends T, ? extends T> alignment, Function<? super T, ? extends V> keyFunction) { // we first determine all keys we could ever encounter to ensure we can construct our map ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ",", "V", ">", "ImmutableMap", "<", "V", ",", "Alignment", "<", "T", ",", "T", ">", ">", "splitAlignmentByKeyFunction", "(", "Alignment", "<", "?", "extends", "T", ",", "?"...
Splits an alignment into many alignments based on a function mapping aligned items to some set of keys. Returns a map where the keys are all observed outputs of the key function on items in the alignment and the values are new alignments containing only elements which yield that output when the key function is applied...
[ "Splits", "an", "alignment", "into", "many", "alignments", "based", "on", "a", "function", "mapping", "aligned", "items", "to", "some", "set", "of", "keys", ".", "Returns", "a", "map", "where", "the", "keys", "are", "all", "observed", "outputs", "of", "the...
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/scoring-open/src/main/java/com/bbn/bue/common/evaluation/Alignments.java#L29-L78
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java
DefaultProgression.fireStateChange
protected void fireStateChange() { if (this.listeners != null) { final ProgressionEvent event = new ProgressionEvent(this, isRootModel()); for (final ProgressionListener listener : this.listeners.getListeners(ProgressionListener.class)) { listener.onProgressionStateChanged(event); } } }
java
protected void fireStateChange() { if (this.listeners != null) { final ProgressionEvent event = new ProgressionEvent(this, isRootModel()); for (final ProgressionListener listener : this.listeners.getListeners(ProgressionListener.class)) { listener.onProgressionStateChanged(event); } } }
[ "protected", "void", "fireStateChange", "(", ")", "{", "if", "(", "this", ".", "listeners", "!=", "null", ")", "{", "final", "ProgressionEvent", "event", "=", "new", "ProgressionEvent", "(", "this", ",", "isRootModel", "(", ")", ")", ";", "for", "(", "fi...
Notify listeners about state change.
[ "Notify", "listeners", "about", "state", "change", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java#L170-L177
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java
DefaultProgression.fireValueChange
protected void fireValueChange() { if (this.listeners != null) { final ProgressionEvent event = new ProgressionEvent(this, isRootModel()); for (final ProgressionListener listener : this.listeners.getListeners(ProgressionListener.class)) { listener.onProgressionValueChanged(event); } } }
java
protected void fireValueChange() { if (this.listeners != null) { final ProgressionEvent event = new ProgressionEvent(this, isRootModel()); for (final ProgressionListener listener : this.listeners.getListeners(ProgressionListener.class)) { listener.onProgressionValueChanged(event); } } }
[ "protected", "void", "fireValueChange", "(", ")", "{", "if", "(", "this", ".", "listeners", "!=", "null", ")", "{", "final", "ProgressionEvent", "event", "=", "new", "ProgressionEvent", "(", "this", ",", "isRootModel", "(", ")", ")", ";", "for", "(", "fi...
Notify listeners about value change.
[ "Notify", "listeners", "about", "value", "change", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java#L181-L188
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java
DefaultProgression.setValue
void setValue(SubProgressionModel subTask, double newValue, String comment) { setProperties(newValue, this.min, this.max, this.isAdjusting, comment == null ? this.comment : comment, true, true, false, subTask); }
java
void setValue(SubProgressionModel subTask, double newValue, String comment) { setProperties(newValue, this.min, this.max, this.isAdjusting, comment == null ? this.comment : comment, true, true, false, subTask); }
[ "void", "setValue", "(", "SubProgressionModel", "subTask", ",", "double", "newValue", ",", "String", "comment", ")", "{", "setProperties", "(", "newValue", ",", "this", ".", "min", ",", "this", ".", "max", ",", "this", ".", "isAdjusting", ",", "comment", "...
Set the value with a float-point precision. This method is invoked from a subtask. @param subTask the subtask. @param newValue the new value. @param comment the new comment.
[ "Set", "the", "value", "with", "a", "float", "-", "point", "precision", ".", "This", "method", "is", "invoked", "from", "a", "subtask", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java#L342-L346
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java
DefaultProgression.disconnectSubTask
void disconnectSubTask(SubProgressionModel subTask, double value, boolean overwriteComment) { if (this.child == subTask) { if (overwriteComment) { final String cmt = subTask.getComment(); if (cmt != null) { this.comment = cmt; } } this.child = null; setProperties(value, this.min, this.max...
java
void disconnectSubTask(SubProgressionModel subTask, double value, boolean overwriteComment) { if (this.child == subTask) { if (overwriteComment) { final String cmt = subTask.getComment(); if (cmt != null) { this.comment = cmt; } } this.child = null; setProperties(value, this.min, this.max...
[ "void", "disconnectSubTask", "(", "SubProgressionModel", "subTask", ",", "double", "value", ",", "boolean", "overwriteComment", ")", "{", "if", "(", "this", ".", "child", "==", "subTask", ")", "{", "if", "(", "overwriteComment", ")", "{", "final", "String", ...
Set the parent value and disconnect this subtask from its parent. This method is invoked from a subtask. @param subTask the subtask to disconnect. @param value the value of the task. @param overwriteComment indicates if the comment of this parent model may be overwritten by the child's comment.
[ "Set", "the", "parent", "value", "and", "disconnect", "this", "subtask", "from", "its", "parent", ".", "This", "method", "is", "invoked", "from", "a", "subtask", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/progress/DefaultProgression.java#L398-L409
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusLineLayer.java
BusLineLayer.onBusItineraryAdded
protected boolean onBusItineraryAdded(BusItinerary itinerary, int index) { if (this.autoUpdate.get()) { try { addMapLayer(index, new BusItineraryLayer(itinerary, isLayerAutoUpdated())); return true; } catch (Throwable exception) { // } } return false; }
java
protected boolean onBusItineraryAdded(BusItinerary itinerary, int index) { if (this.autoUpdate.get()) { try { addMapLayer(index, new BusItineraryLayer(itinerary, isLayerAutoUpdated())); return true; } catch (Throwable exception) { // } } return false; }
[ "protected", "boolean", "onBusItineraryAdded", "(", "BusItinerary", "itinerary", ",", "int", "index", ")", "{", "if", "(", "this", ".", "autoUpdate", ".", "get", "(", ")", ")", "{", "try", "{", "addMapLayer", "(", "index", ",", "new", "BusItineraryLayer", ...
Invoked when a bus itinerary was added in the attached line. <p>This function exists to allow be override to provide a specific behaviour when a bus itinerary has been added. @param itinerary is the new itinerary. @param index is the index of the bus itinerary. @return <code>true</code> if the events was fired, other...
[ "Invoked", "when", "a", "bus", "itinerary", "was", "added", "in", "the", "attached", "line", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusLineLayer.java#L253-L263
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusLineLayer.java
BusLineLayer.onBusItineraryRemoved
protected boolean onBusItineraryRemoved(BusItinerary itinerary, int index) { if (this.autoUpdate.get()) { try { removeMapLayerAt(index); return true; } catch (Throwable exception) { // } } return false; }
java
protected boolean onBusItineraryRemoved(BusItinerary itinerary, int index) { if (this.autoUpdate.get()) { try { removeMapLayerAt(index); return true; } catch (Throwable exception) { // } } return false; }
[ "protected", "boolean", "onBusItineraryRemoved", "(", "BusItinerary", "itinerary", ",", "int", "index", ")", "{", "if", "(", "this", ".", "autoUpdate", ".", "get", "(", ")", ")", "{", "try", "{", "removeMapLayerAt", "(", "index", ")", ";", "return", "true"...
Invoked when a bus itinerary was removed from the attached line. <p>This function exists to allow be override to provide a specific behaviour when a bus itinerary has been removed. @param itinerary is the removed itinerary. @param index is the index of the bus itinerary. @return <code>true</code> if the events was fi...
[ "Invoked", "when", "a", "bus", "itinerary", "was", "removed", "from", "the", "attached", "line", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusLineLayer.java#L274-L284
train
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileReader.java
GISShapeFileReader.fromESRI
@Pure @SuppressWarnings("checkstyle:cyclomaticcomplexity") public static Class<? extends MapElement> fromESRI(ShapeElementType type) { switch (type) { case MULTIPOINT: case MULTIPOINT_M: case MULTIPOINT_Z: return MapMultiPoint.class; case POINT: case POINT_M: case POINT_Z: return MapPoint.class; ...
java
@Pure @SuppressWarnings("checkstyle:cyclomaticcomplexity") public static Class<? extends MapElement> fromESRI(ShapeElementType type) { switch (type) { case MULTIPOINT: case MULTIPOINT_M: case MULTIPOINT_Z: return MapMultiPoint.class; case POINT: case POINT_M: case POINT_Z: return MapPoint.class; ...
[ "@", "Pure", "@", "SuppressWarnings", "(", "\"checkstyle:cyclomaticcomplexity\"", ")", "public", "static", "Class", "<", "?", "extends", "MapElement", ">", "fromESRI", "(", "ShapeElementType", "type", ")", "{", "switch", "(", "type", ")", "{", "case", "MULTIPOIN...
Replies the type of map element which is corresponding to the given ESRI type. @param type the type of element. @return the type of map element. @throws IllegalArgumentException if the given type is not supported by the I/O API. @since 4.0
[ "Replies", "the", "type", "of", "map", "element", "which", "is", "corresponding", "to", "the", "given", "ESRI", "type", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileReader.java#L646-L670
train
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileReader.java
GISShapeFileReader.getMapElementType
@Pure public Class<? extends MapElement> getMapElementType() { if (this.elementType != null) { return this.elementType; } try { return fromESRI(getShapeElementType()); } catch (IllegalArgumentException exception) { // } return null; }
java
@Pure public Class<? extends MapElement> getMapElementType() { if (this.elementType != null) { return this.elementType; } try { return fromESRI(getShapeElementType()); } catch (IllegalArgumentException exception) { // } return null; }
[ "@", "Pure", "public", "Class", "<", "?", "extends", "MapElement", ">", "getMapElementType", "(", ")", "{", "if", "(", "this", ".", "elementType", "!=", "null", ")", "{", "return", "this", ".", "elementType", ";", "}", "try", "{", "return", "fromESRI", ...
Replies the type of map element replied by this reader. <p>This function retrieve the element type from the header with {@link #getShapeElementType()} and matches it to the GIS API with {@link #fromESRI(ShapeElementType)}. @return the type of map element; or <code>null</code> if unsupported. @since 4.0
[ "Replies", "the", "type", "of", "map", "element", "replied", "by", "this", "reader", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileReader.java#L682-L693
train
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileReader.java
GISShapeFileReader.extractUUID
protected static UUID extractUUID(AttributeProvider provider) { AttributeValue value; value = provider.getAttribute(UUID_ATTR); if (value != null) { try { return value.getUUID(); } catch (InvalidAttributeTypeException e) { // } catch (AttributeNotInitializedException e) { // } } valu...
java
protected static UUID extractUUID(AttributeProvider provider) { AttributeValue value; value = provider.getAttribute(UUID_ATTR); if (value != null) { try { return value.getUUID(); } catch (InvalidAttributeTypeException e) { // } catch (AttributeNotInitializedException e) { // } } valu...
[ "protected", "static", "UUID", "extractUUID", "(", "AttributeProvider", "provider", ")", "{", "AttributeValue", "value", ";", "value", "=", "provider", ".", "getAttribute", "(", "UUID_ATTR", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "try", "{", ...
Extract the UUID from the attributes. @param provider is a provider of attributes @return the uuid if found or <code>null</code> if none.
[ "Extract", "the", "UUID", "from", "the", "attributes", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/shape/GISShapeFileReader.java#L714-L740
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/menu/popup/listeners/PopupListener.java
PopupListener.onShowPopup
protected void onShowPopup(final MouseEvent e) { if (e.isPopupTrigger()) { System.out.println(e.getSource()); popupMenu.show(e.getComponent(), e.getX(), e.getY()); } }
java
protected void onShowPopup(final MouseEvent e) { if (e.isPopupTrigger()) { System.out.println(e.getSource()); popupMenu.show(e.getComponent(), e.getX(), e.getY()); } }
[ "protected", "void", "onShowPopup", "(", "final", "MouseEvent", "e", ")", "{", "if", "(", "e", ".", "isPopupTrigger", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "e", ".", "getSource", "(", ")", ")", ";", "popupMenu", ".", "show", ...
Callback method that is called on show popup. @param e the mouse event
[ "Callback", "method", "that", "is", "called", "on", "show", "popup", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/menu/popup/listeners/PopupListener.java#L80-L87
train
killme2008/hs4j
src/main/java/com/google/code/hs4j/network/hs/HandlerSocketSessionImpl.java
HandlerSocketSessionImpl.takeExecutingCommand
private final Command takeExecutingCommand() { try { return this.commandAlreadySent.take(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } return null; }
java
private final Command takeExecutingCommand() { try { return this.commandAlreadySent.take(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } return null; }
[ "private", "final", "Command", "takeExecutingCommand", "(", ")", "{", "try", "{", "return", "this", ".", "commandAlreadySent", ".", "take", "(", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "Thread", ".", "currentThread", "(", ")", "...
get current command from queue @return
[ "get", "current", "command", "from", "queue" ]
805fe14bfe270d95009514c224d93c5fe3575f11
https://github.com/killme2008/hs4j/blob/805fe14bfe270d95009514c224d93c5fe3575f11/src/main/java/com/google/code/hs4j/network/hs/HandlerSocketSessionImpl.java#L103-L110
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/LibraryLoader.java
LibraryLoader.load
public static void load(URL filename) throws IOException { // Silently ignore loading query if (disable) { return; } if (URISchemeType.FILE.isURL(filename)) { try { load(new File(filename.toURI())); } catch (URISyntaxException e) { throw new FileNotFoundException(filename.toExternalForm()); ...
java
public static void load(URL filename) throws IOException { // Silently ignore loading query if (disable) { return; } if (URISchemeType.FILE.isURL(filename)) { try { load(new File(filename.toURI())); } catch (URISyntaxException e) { throw new FileNotFoundException(filename.toExternalForm()); ...
[ "public", "static", "void", "load", "(", "URL", "filename", ")", "throws", "IOException", "{", "// Silently ignore loading query", "if", "(", "disable", ")", "{", "return", ";", "}", "if", "(", "URISchemeType", ".", "FILE", ".", "isURL", "(", "filename", ")"...
Loads a code file with the specified filename from the local file system as a dynamic library. The filename argument must be a complete path name. @param filename is the file to load. @throws IOException when reading error occurs. @throws SecurityException if a security manager exists and its <code>checkLink</code> m...
[ "Loads", "a", "code", "file", "with", "the", "specified", "filename", "from", "the", "local", "file", "system", "as", "a", "dynamic", "library", ".", "The", "filename", "argument", "must", "be", "a", "complete", "path", "name", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/LibraryLoader.java#L130-L171
train
gallandarakhneorg/afc
advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java
AbstractShapeFileReader.readPoint
private E readPoint(int elementIndex, ShapeElementType type) throws IOException { final boolean hasZ = type.hasZ(); final boolean hasM = type.hasM(); // Read coordinates final double x = fromESRI_x(readLEDouble()); final double y = fromESRI_y(readLEDouble()); double z = 0; double measure = Double.NaN; ...
java
private E readPoint(int elementIndex, ShapeElementType type) throws IOException { final boolean hasZ = type.hasZ(); final boolean hasM = type.hasM(); // Read coordinates final double x = fromESRI_x(readLEDouble()); final double y = fromESRI_y(readLEDouble()); double z = 0; double measure = Double.NaN; ...
[ "private", "E", "readPoint", "(", "int", "elementIndex", ",", "ShapeElementType", "type", ")", "throws", "IOException", "{", "final", "boolean", "hasZ", "=", "type", ".", "hasZ", "(", ")", ";", "final", "boolean", "hasM", "=", "type", ".", "hasM", "(", "...
Read a point. @param elementIndex is the index of the element inside the shape file @param type is the type of the element to read. @return an object representing the creating point, depending of your implementation. This value will be passed to {@link #postRecordReadingStage(E)}.
[ "Read", "a", "point", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java#L278-L301
train
gallandarakhneorg/afc
advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java
AbstractShapeFileReader.readPolyElement
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) private E readPolyElement(int elementIndex, ShapeElementType type) throws IOException { final boolean hasZ = type.hasZ(); final boolean hasM = type.hasM(); // Ignore the bounds stored inside the file skipBytes(8 * 4); // C...
java
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) private E readPolyElement(int elementIndex, ShapeElementType type) throws IOException { final boolean hasZ = type.hasZ(); final boolean hasM = type.hasM(); // Ignore the bounds stored inside the file skipBytes(8 * 4); // C...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:cyclomaticcomplexity\"", ",", "\"checkstyle:npathcomplexity\"", "}", ")", "private", "E", "readPolyElement", "(", "int", "elementIndex", ",", "ShapeElementType", "type", ")", "throws", "IOException", "{", "final", "boolea...
Read a polyelement. @param elementIndex is the index of the element inside the shape file @return an object representing the creating point, depending of your implementation. This value will be passed to {@link #postRecordReadingStage(E)}.
[ "Read", "a", "polyelement", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java#L320-L411
train
gallandarakhneorg/afc
advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java
AbstractShapeFileReader.readMultiPatch
private E readMultiPatch(int elementIndex, ShapeElementType type) throws IOException { // Ignore the bounds stored inside the file skipBytes(8 * 4); // Read the part count final int partCount = readLEInt(); // Read the point count final int pointCount = readLEInt(); // Read the parts' indexes final i...
java
private E readMultiPatch(int elementIndex, ShapeElementType type) throws IOException { // Ignore the bounds stored inside the file skipBytes(8 * 4); // Read the part count final int partCount = readLEInt(); // Read the point count final int pointCount = readLEInt(); // Read the parts' indexes final i...
[ "private", "E", "readMultiPatch", "(", "int", "elementIndex", ",", "ShapeElementType", "type", ")", "throws", "IOException", "{", "// Ignore the bounds stored inside the file", "skipBytes", "(", "8", "*", "4", ")", ";", "// Read the part count", "final", "int", "partC...
Read a multipatch. <p>A MultiPatch consists of a number of surface patches. Each surface patch describes a surface. The surface patches of a MultiPatch are referred to as its parts, and the type of part controls how the order of vertices of an MultiPatch part is interpreted. <p>A single Triangle Strip, or Triangle Fa...
[ "Read", "a", "multipatch", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java#L435-L505
train
gallandarakhneorg/afc
advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java
AbstractShapeFileReader.readAttributesFromDBaseFile
private void readAttributesFromDBaseFile(E created_element) throws IOException { // Read the DBF entry if (this.dbfReader != null) { final List<DBaseFileField> dbfColumns = this.dbfReader.getDBFFields(); // Read the record even if the shape element was not inserted into // the database. It is necessary t...
java
private void readAttributesFromDBaseFile(E created_element) throws IOException { // Read the DBF entry if (this.dbfReader != null) { final List<DBaseFileField> dbfColumns = this.dbfReader.getDBFFields(); // Read the record even if the shape element was not inserted into // the database. It is necessary t...
[ "private", "void", "readAttributesFromDBaseFile", "(", "E", "created_element", ")", "throws", "IOException", "{", "// Read the DBF entry", "if", "(", "this", ".", "dbfReader", "!=", "null", ")", "{", "final", "List", "<", "DBaseFileField", ">", "dbfColumns", "=", ...
Create the attribute values that correspond to the dBase content. @param created_element is an object representing the creating point, depending of your implementation. This value will be passed to {@link #postRecordReadingStage(Object)}. @throws IOException in case of error.
[ "Create", "the", "attribute", "values", "that", "correspond", "to", "the", "dBase", "content", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractShapeFileReader.java#L579-L607
train
gallandarakhneorg/afc
core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/StochasticGenerator.java
StochasticGenerator.noiseValue
@Pure public static double noiseValue(double value, MathFunction noiseLaw) throws MathException { try { double noise = Math.abs(noiseLaw.f(value)); initRandomNumberList(); noise *= uniformRandomVariableList.nextFloat(); if (uniformRandomVariableList.nextBoolea...
java
@Pure public static double noiseValue(double value, MathFunction noiseLaw) throws MathException { try { double noise = Math.abs(noiseLaw.f(value)); initRandomNumberList(); noise *= uniformRandomVariableList.nextFloat(); if (uniformRandomVariableList.nextBoolea...
[ "@", "Pure", "public", "static", "double", "noiseValue", "(", "double", "value", ",", "MathFunction", "noiseLaw", ")", "throws", "MathException", "{", "try", "{", "double", "noise", "=", "Math", ".", "abs", "(", "noiseLaw", ".", "f", "(", "value", ")", "...
Add a noise to the specified value. <p>The returned value is given by: {@code (value-noise) &lt; value &lt; (value+noise)} where {@code 0 &lt;= noise &lt;= max(abs(value), noiseLaw(value))}. The {@code noise} is randomly selected according to the given random number list. <p>This method uses a {@link UniformStochasti...
[ "Add", "a", "noise", "to", "the", "specified", "value", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/StochasticGenerator.java#L86-L99
train
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/Transform3D.java
Transform3D.setRotation
public void setRotation(Quaternion rotation) { this.m00 = 1.0f - 2.0f * rotation.getY() * rotation.getY() - 2.0f * rotation.getZ() * rotation.getZ(); this.m10 = 2.0f * (rotation.getX() * rotation.getY() + rotation.getW() * rotation.getZ()); this.m20 = 2.0f * (rotation.getX() * rotation.getZ() - ...
java
public void setRotation(Quaternion rotation) { this.m00 = 1.0f - 2.0f * rotation.getY() * rotation.getY() - 2.0f * rotation.getZ() * rotation.getZ(); this.m10 = 2.0f * (rotation.getX() * rotation.getY() + rotation.getW() * rotation.getZ()); this.m20 = 2.0f * (rotation.getX() * rotation.getZ() - ...
[ "public", "void", "setRotation", "(", "Quaternion", "rotation", ")", "{", "this", ".", "m00", "=", "1.0f", "-", "2.0f", "*", "rotation", ".", "getY", "(", ")", "*", "rotation", ".", "getY", "(", ")", "-", "2.0f", "*", "rotation", ".", "getZ", "(", ...
Set the rotation for the object but do not change the translation. <p>This function changes only the elements of the matrix related to the rotation. The translation is not changed. <p>After a call to this function, the matrix will contains (? means any value, and r is the translation of the quaternion as a 3x3 matrix...
[ "Set", "the", "rotation", "for", "the", "object", "but", "do", "not", "change", "the", "translation", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/Transform3D.java#L255-L267
train
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/Transform3D.java
Transform3D.makeRotationMatrix
public final void makeRotationMatrix(Quaternion rotation) { this.m00 = 1.0f - 2.0f * rotation.getY() * rotation.getY() - 2.0f * rotation.getZ() * rotation.getZ(); this.m10 = 2.0f * (rotation.getX() * rotation.getY() + rotation.getW() * rotation.getZ()); this.m20 = 2.0f * (rotation.getX() * rotat...
java
public final void makeRotationMatrix(Quaternion rotation) { this.m00 = 1.0f - 2.0f * rotation.getY() * rotation.getY() - 2.0f * rotation.getZ() * rotation.getZ(); this.m10 = 2.0f * (rotation.getX() * rotation.getY() + rotation.getW() * rotation.getZ()); this.m20 = 2.0f * (rotation.getX() * rotat...
[ "public", "final", "void", "makeRotationMatrix", "(", "Quaternion", "rotation", ")", "{", "this", ".", "m00", "=", "1.0f", "-", "2.0f", "*", "rotation", ".", "getY", "(", ")", "*", "rotation", ".", "getY", "(", ")", "-", "2.0f", "*", "rotation", ".", ...
Sets the value of this matrix to a rotation matrix, and no translation. <p>This function changes all the elements of the matrix, including the translation. <p>After a call to this function, the matrix will contains (? means any value, and r a value from the quaternion): <pre> [ r r r 0 ] [ r r r 0 ] [ ...
[ "Sets", "the", "value", "of", "this", "matrix", "to", "a", "rotation", "matrix", "and", "no", "translation", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/Transform3D.java#L315-L336
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.setPosition
void setPosition(Point2D<?, ?> position) { this.location = position == null ? null : new SoftReference<>(Point2d.convert(position)); }
java
void setPosition(Point2D<?, ?> position) { this.location = position == null ? null : new SoftReference<>(Point2d.convert(position)); }
[ "void", "setPosition", "(", "Point2D", "<", "?", ",", "?", ">", "position", ")", "{", "this", ".", "location", "=", "position", "==", "null", "?", "null", ":", "new", "SoftReference", "<>", "(", "Point2d", ".", "convert", "(", "position", ")", ")", "...
Set the temporary buffer of the position of the road connection. @param position a position. @since 4.0
[ "Set", "the", "temporary", "buffer", "of", "the", "position", "of", "the", "road", "connection", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L226-L228
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.addConnectedSegment
void addConnectedSegment(RoadPolyline segment, boolean attachToStartPoint) { if (segment == null) { return; } if (this.connectedSegments.isEmpty()) { this.connectedSegments.add(new Connection(segment, attachToStartPoint)); } else { // Compute the angle to the unit vector for the new segment final do...
java
void addConnectedSegment(RoadPolyline segment, boolean attachToStartPoint) { if (segment == null) { return; } if (this.connectedSegments.isEmpty()) { this.connectedSegments.add(new Connection(segment, attachToStartPoint)); } else { // Compute the angle to the unit vector for the new segment final do...
[ "void", "addConnectedSegment", "(", "RoadPolyline", "segment", ",", "boolean", "attachToStartPoint", ")", "{", "if", "(", "segment", "==", "null", ")", "{", "return", ";", "}", "if", "(", "this", ".", "connectedSegments", ".", "isEmpty", "(", ")", ")", "{"...
Add a segment to this connection point. <p>The segments are ordered according to there geo-localization along a trigonometric cicle. The first segment has the nearest angle to the vector (1,0), and the following segments are ordered according to the positive value of there angles to this unity vector (counterclockwise...
[ "Add", "a", "segment", "to", "this", "connection", "point", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L310-L326
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.removeConnectedSegment
int removeConnectedSegment(RoadSegment segment, boolean attachToStartPoint) { if (segment == null) { return -1; } final int idx = indexOf(segment, attachToStartPoint); if (idx != -1) { this.connectedSegments.remove(idx); fireIteratorUpdate(); } return idx; }
java
int removeConnectedSegment(RoadSegment segment, boolean attachToStartPoint) { if (segment == null) { return -1; } final int idx = indexOf(segment, attachToStartPoint); if (idx != -1) { this.connectedSegments.remove(idx); fireIteratorUpdate(); } return idx; }
[ "int", "removeConnectedSegment", "(", "RoadSegment", "segment", ",", "boolean", "attachToStartPoint", ")", "{", "if", "(", "segment", "==", "null", ")", "{", "return", "-", "1", ";", "}", "final", "int", "idx", "=", "indexOf", "(", "segment", ",", "attachT...
Remove a connection with a segment. @param segment is the segment to remove. @param attachToStartPoint indicates if the segment is attached by its start point (if value is <code>true</code>) or by its end point @return the index of the removed segment, or {@code -1} if none was found
[ "Remove", "a", "connection", "with", "a", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L414-L424
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.addListeningIterator
protected void addListeningIterator(IClockwiseIterator iterator) { if (this.listeningIterators == null) { this.listeningIterators = new WeakArrayList<>(); } this.listeningIterators.add(iterator); }
java
protected void addListeningIterator(IClockwiseIterator iterator) { if (this.listeningIterators == null) { this.listeningIterators = new WeakArrayList<>(); } this.listeningIterators.add(iterator); }
[ "protected", "void", "addListeningIterator", "(", "IClockwiseIterator", "iterator", ")", "{", "if", "(", "this", ".", "listeningIterators", "==", "null", ")", "{", "this", ".", "listeningIterators", "=", "new", "WeakArrayList", "<>", "(", ")", ";", "}", "this"...
Add a listening iterator. @param iterator the iterator.
[ "Add", "a", "listening", "iterator", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L828-L833
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.removeListeningIterator
protected void removeListeningIterator(IClockwiseIterator iterator) { if (this.listeningIterators != null) { this.listeningIterators.remove(iterator); if (this.listeningIterators.isEmpty()) { this.listeningIterators = null; } } }
java
protected void removeListeningIterator(IClockwiseIterator iterator) { if (this.listeningIterators != null) { this.listeningIterators.remove(iterator); if (this.listeningIterators.isEmpty()) { this.listeningIterators = null; } } }
[ "protected", "void", "removeListeningIterator", "(", "IClockwiseIterator", "iterator", ")", "{", "if", "(", "this", ".", "listeningIterators", "!=", "null", ")", "{", "this", ".", "listeningIterators", ".", "remove", "(", "iterator", ")", ";", "if", "(", "this...
Remove a listening iterator. @param iterator the iterator.
[ "Remove", "a", "listening", "iterator", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L839-L846
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.fireIteratorUpdate
protected void fireIteratorUpdate() { if (this.listeningIterators != null) { for (final IClockwiseIterator iterator : this.listeningIterators) { if (iterator != null) { iterator.dataStructureUpdated(); } } } }
java
protected void fireIteratorUpdate() { if (this.listeningIterators != null) { for (final IClockwiseIterator iterator : this.listeningIterators) { if (iterator != null) { iterator.dataStructureUpdated(); } } } }
[ "protected", "void", "fireIteratorUpdate", "(", ")", "{", "if", "(", "this", ".", "listeningIterators", "!=", "null", ")", "{", "for", "(", "final", "IClockwiseIterator", "iterator", ":", "this", ".", "listeningIterators", ")", "{", "if", "(", "iterator", "!...
Notify the iterators about changes.
[ "Notify", "the", "iterators", "about", "changes", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L850-L858
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.getPreferredRoadColor
@Pure public static int getPreferredRoadColor(RoadType roadType, boolean useSystemValue) { final RoadType rt = roadType == null ? RoadType.OTHER : roadType; final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { final String str = prefs.get("ROAD_COLOR...
java
@Pure public static int getPreferredRoadColor(RoadType roadType, boolean useSystemValue) { final RoadType rt = roadType == null ? RoadType.OTHER : roadType; final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { final String str = prefs.get("ROAD_COLOR...
[ "@", "Pure", "public", "static", "int", "getPreferredRoadColor", "(", "RoadType", "roadType", ",", "boolean", "useSystemValue", ")", "{", "final", "RoadType", "rt", "=", "roadType", "==", "null", "?", "RoadType", ".", "OTHER", ":", "roadType", ";", "final", ...
Replies the preferred color to draw the content of the roads of the given type. @param roadType is the type of road for which the color should be replied. @param useSystemValue indicates if the <code>null</code> value must be replaced by the default system value in {@link #DEFAULT_ROAD_COLORS} (if <code>true</code>). ...
[ "Replies", "the", "preferred", "color", "to", "draw", "the", "content", "of", "the", "roads", "of", "the", "given", "type", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L170-L188
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.setPreferredRoadColor
public static void setPreferredRoadColor(RoadType roadType, Integer color) { final RoadType rt = roadType == null ? RoadType.OTHER : roadType; final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (color == null || color.intValue() == DEFAULT_ROAD_CO...
java
public static void setPreferredRoadColor(RoadType roadType, Integer color) { final RoadType rt = roadType == null ? RoadType.OTHER : roadType; final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (color == null || color.intValue() == DEFAULT_ROAD_CO...
[ "public", "static", "void", "setPreferredRoadColor", "(", "RoadType", "roadType", ",", "Integer", "color", ")", "{", "final", "RoadType", "rt", "=", "roadType", "==", "null", "?", "RoadType", ".", "OTHER", ":", "roadType", ";", "final", "Preferences", "prefs",...
Set the preferred color to draw the content of the roads of the given type. @param roadType is the type of road for which the color should be replied. @param color is the color or <code>null</code> to restore the default value.
[ "Set", "the", "preferred", "color", "to", "draw", "the", "content", "of", "the", "roads", "of", "the", "given", "type", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L195-L210
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.getPreferredRoadInternDrawing
@Pure public static boolean getPreferredRoadInternDrawing() { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { return prefs.getBoolean("ROAD_INTERN_DRAWING", DEFAULT_ROAD_INTERN_DRAWING); //$NON-NLS-1$ } return DEFAULT_ROAD_INTERN_DRAWING; }
java
@Pure public static boolean getPreferredRoadInternDrawing() { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { return prefs.getBoolean("ROAD_INTERN_DRAWING", DEFAULT_ROAD_INTERN_DRAWING); //$NON-NLS-1$ } return DEFAULT_ROAD_INTERN_DRAWING; }
[ "@", "Pure", "public", "static", "boolean", "getPreferredRoadInternDrawing", "(", ")", "{", "final", "Preferences", "prefs", "=", "Preferences", ".", "userNodeForPackage", "(", "RoadNetworkLayerConstants", ".", "class", ")", ";", "if", "(", "prefs", "!=", "null", ...
Replies if the internal data structure used to store the road network may be drawn on the displayers. @return <code>true</code> if the internal data structures may be drawn on the displayers, otherwise <code>false</code>.
[ "Replies", "if", "the", "internal", "data", "structure", "used", "to", "store", "the", "road", "network", "may", "be", "drawn", "on", "the", "displayers", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L278-L285
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.setPreferredRoadInternDrawing
public static void setPreferredRoadInternDrawing(Boolean draw) { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (draw == null) { prefs.remove("ROAD_INTERN_DRAWING"); //$NON-NLS-1$ } else { prefs.putBoolean("ROAD_INTERN_DRAWING", draw)...
java
public static void setPreferredRoadInternDrawing(Boolean draw) { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (draw == null) { prefs.remove("ROAD_INTERN_DRAWING"); //$NON-NLS-1$ } else { prefs.putBoolean("ROAD_INTERN_DRAWING", draw)...
[ "public", "static", "void", "setPreferredRoadInternDrawing", "(", "Boolean", "draw", ")", "{", "final", "Preferences", "prefs", "=", "Preferences", ".", "userNodeForPackage", "(", "RoadNetworkLayerConstants", ".", "class", ")", ";", "if", "(", "prefs", "!=", "null...
Set if the internal data structure used to store the road network may be drawn on the displayers. @param draw is <code>true</code> if the internal data structures may be drawn on the displayers, <code>false</code> if the internal data structures may not be drawn on the displayers, <code>null</code> to restore the defa...
[ "Set", "if", "the", "internal", "data", "structure", "used", "to", "store", "the", "road", "network", "may", "be", "drawn", "on", "the", "displayers", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L295-L309
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.getPreferredRoadInternColor
@Pure public static int getPreferredRoadInternColor() { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { final String color = prefs.get("ROAD_INTERN_COLOR", null); //$NON-NLS-1$ if (color != null) { try { return Integer.valueOf(color); ...
java
@Pure public static int getPreferredRoadInternColor() { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { final String color = prefs.get("ROAD_INTERN_COLOR", null); //$NON-NLS-1$ if (color != null) { try { return Integer.valueOf(color); ...
[ "@", "Pure", "public", "static", "int", "getPreferredRoadInternColor", "(", ")", "{", "final", "Preferences", "prefs", "=", "Preferences", ".", "userNodeForPackage", "(", "RoadNetworkLayerConstants", ".", "class", ")", ";", "if", "(", "prefs", "!=", "null", ")",...
Replies the color of the internal data structures used when they are drawn on the displayers. @return the color of the internal data structures, never <code>null</code>.
[ "Replies", "the", "color", "of", "the", "internal", "data", "structures", "used", "when", "they", "are", "drawn", "on", "the", "displayers", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L316-L330
train
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.setPreferredRoadInternColor
public static void setPreferredRoadInternColor(Integer color) { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (color == null) { prefs.remove("ROAD_INTERN_COLOR"); //$NON-NLS-1$ } else { prefs.put("ROAD_INTERN_COLOR", Integer.toString...
java
public static void setPreferredRoadInternColor(Integer color) { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (color == null) { prefs.remove("ROAD_INTERN_COLOR"); //$NON-NLS-1$ } else { prefs.put("ROAD_INTERN_COLOR", Integer.toString...
[ "public", "static", "void", "setPreferredRoadInternColor", "(", "Integer", "color", ")", "{", "final", "Preferences", "prefs", "=", "Preferences", ".", "userNodeForPackage", "(", "RoadNetworkLayerConstants", ".", "class", ")", ";", "if", "(", "prefs", "!=", "null"...
Set the color of the internal data structures used when they are drawn on the displayers. @param color is the color of the internal data structures, never <code>null</code>.
[ "Set", "the", "color", "of", "the", "internal", "data", "structures", "used", "when", "they", "are", "drawn", "on", "the", "displayers", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L337-L351
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.clamp
@Pure public static double clamp(double v, double min, double max) { assert min <= max : AssertMessages.lowerEqualParameters(1, min, 2, max); if (v < min) { return min; } if (v > max) { return max; } return v; }
java
@Pure public static double clamp(double v, double min, double max) { assert min <= max : AssertMessages.lowerEqualParameters(1, min, 2, max); if (v < min) { return min; } if (v > max) { return max; } return v; }
[ "@", "Pure", "public", "static", "double", "clamp", "(", "double", "v", ",", "double", "min", ",", "double", "max", ")", "{", "assert", "min", "<=", "max", ":", "AssertMessages", ".", "lowerEqualParameters", "(", "1", ",", "min", ",", "2", ",", "max", ...
Clamp the given value to the given range. <p>If the value is outside the {@code [min;max]} range, it is clamp to the nearest bounding value {@code min} or {@code max}. @param v is the value to clamp. @param min is the min value of the range. @param max is the max value of the range. @return the value in {@code [min;m...
[ "Clamp", "the", "given", "value", "to", "the", "given", "range", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L80-L90
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.clampCyclic
@Pure public static double clampCyclic(double value, double min, double max) { assert min <= max : AssertMessages.lowerEqualParameters(1, min, 2, max); if (Double.isNaN(max) || Double.isNaN(min) || Double.isNaN(max)) { return Double.NaN; } if (value < min) { final double perimeter = max - min; final d...
java
@Pure public static double clampCyclic(double value, double min, double max) { assert min <= max : AssertMessages.lowerEqualParameters(1, min, 2, max); if (Double.isNaN(max) || Double.isNaN(min) || Double.isNaN(max)) { return Double.NaN; } if (value < min) { final double perimeter = max - min; final d...
[ "@", "Pure", "public", "static", "double", "clampCyclic", "(", "double", "value", ",", "double", "min", ",", "double", "max", ")", "{", "assert", "min", "<=", "max", ":", "AssertMessages", ".", "lowerEqualParameters", "(", "1", ",", "min", ",", "2", ",",...
Clamp the given value to fit between the min and max values according to a cyclic heuristic. If the given value is not between the minimum and maximum values, the replied value is modulo the min-max range. @param value the value to clamp. @param min the minimum value inclusive. @param max the maximum value exclusive. ...
[ "Clamp", "the", "given", "value", "to", "fit", "between", "the", "min", "and", "max", "values", "according", "to", "a", "cyclic", "heuristic", ".", "If", "the", "given", "value", "is", "not", "between", "the", "minimum", "and", "maximum", "values", "the", ...
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L428-L449
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.getMinMax
public static DoubleRange getMinMax(double value1, double value2, double value3) { // Efficient implementation of the min/max determination final double min; final double max; // --------------------------------- // Table of cases // --------------------------------- // a-b a-c b-c sequence min max case ...
java
public static DoubleRange getMinMax(double value1, double value2, double value3) { // Efficient implementation of the min/max determination final double min; final double max; // --------------------------------- // Table of cases // --------------------------------- // a-b a-c b-c sequence min max case ...
[ "public", "static", "DoubleRange", "getMinMax", "(", "double", "value1", ",", "double", "value2", ",", "double", "value3", ")", "{", "// Efficient implementation of the min/max determination", "final", "double", "min", ";", "final", "double", "max", ";", "// ---------...
Determine the min and max values from a set of three values. <p>This function has an algorithm that is efficient for 3 values. <p>If one of the value is {@link Double#NaN}, it is ignored. If all the values are {@link Double#NaN}, the function replies <code>null</code>. @param value1 the first value. @param value2 th...
[ "Determine", "the", "min", "and", "max", "values", "from", "a", "set", "of", "three", "values", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L675-L765
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.csc
@Pure @Inline(value = "1./Math.sin($1)", imported = {Math.class}) public static double csc(double angle) { return 1. / Math.sin(angle); }
java
@Pure @Inline(value = "1./Math.sin($1)", imported = {Math.class}) public static double csc(double angle) { return 1. / Math.sin(angle); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"1./Math.sin($1)\"", ",", "imported", "=", "{", "Math", ".", "class", "}", ")", "public", "static", "double", "csc", "(", "double", "angle", ")", "{", "return", "1.", "/", "Math", ".", "sin", "(", "ang...
Replies the cosecant of the specified angle. <p><code>csc(a) = 1/sin(a)</code> <p><img src="./doc-files/trigo1.png" alt="[Cosecant function]"> <img src="./doc-files/trigo3.png" alt="[Cosecant function]"> @param angle the angle. @return the cosecant of the angle.
[ "Replies", "the", "cosecant", "of", "the", "specified", "angle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L777-L781
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.sec
@Pure @Inline(value = "1./Math.cos($1)", imported = {Math.class}) public static double sec(double angle) { return 1. / Math.cos(angle); }
java
@Pure @Inline(value = "1./Math.cos($1)", imported = {Math.class}) public static double sec(double angle) { return 1. / Math.cos(angle); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"1./Math.cos($1)\"", ",", "imported", "=", "{", "Math", ".", "class", "}", ")", "public", "static", "double", "sec", "(", "double", "angle", ")", "{", "return", "1.", "/", "Math", ".", "cos", "(", "ang...
Replies the secant of the specified angle. <p><code>csc(a) = 1/cos(a)</code> <p><img src="./doc-files/trigo1.png" alt="[Secant function]"> <img src="./doc-files/trigo2.png" alt="[Secant function]"> @param angle the angle. @return the secant of the angle.
[ "Replies", "the", "secant", "of", "the", "specified", "angle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L793-L797
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.cot
@Pure @Inline(value = "1./Math.tan($1)", imported = {Math.class}) public static double cot(double angle) { return 1. / Math.tan(angle); }
java
@Pure @Inline(value = "1./Math.tan($1)", imported = {Math.class}) public static double cot(double angle) { return 1. / Math.tan(angle); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"1./Math.tan($1)\"", ",", "imported", "=", "{", "Math", ".", "class", "}", ")", "public", "static", "double", "cot", "(", "double", "angle", ")", "{", "return", "1.", "/", "Math", ".", "tan", "(", "ang...
Replies the cotangent of the specified angle. <p><code>csc(a) = 1/tan(a)</code> <p><img src="./doc-files/trigo1.png" alt="[Cotangent function]"> <img src="./doc-files/trigo3.png" alt="[Cotangent function]"> @param angle the angle. @return the cotangent of the angle.
[ "Replies", "the", "cotangent", "of", "the", "specified", "angle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L809-L813
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.versin
@Pure @Inline(value = "1.-Math.cos($1)", imported = {Math.class}) public static double versin(double angle) { return 1. - Math.cos(angle); }
java
@Pure @Inline(value = "1.-Math.cos($1)", imported = {Math.class}) public static double versin(double angle) { return 1. - Math.cos(angle); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"1.-Math.cos($1)\"", ",", "imported", "=", "{", "Math", ".", "class", "}", ")", "public", "static", "double", "versin", "(", "double", "angle", ")", "{", "return", "1.", "-", "Math", ".", "cos", "(", "...
Replies the versine of the specified angle. <p><code>versin(a) = 1 - cos(a)</code> <p><img src="./doc-files/trigo1.png" alt="[Versine function]"> @param angle the angle. @return the versine of the angle.
[ "Replies", "the", "versine", "of", "the", "specified", "angle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L824-L828
train
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.crd
@Pure @Inline(value = "2.*Math.sin(($1)/2.)", imported = {Math.class}) public static double crd(double angle) { return 2. * Math.sin(angle / 2.); }
java
@Pure @Inline(value = "2.*Math.sin(($1)/2.)", imported = {Math.class}) public static double crd(double angle) { return 2. * Math.sin(angle / 2.); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"2.*Math.sin(($1)/2.)\"", ",", "imported", "=", "{", "Math", ".", "class", "}", ")", "public", "static", "double", "crd", "(", "double", "angle", ")", "{", "return", "2.", "*", "Math", ".", "sin", "(", ...
Replies the chord of the specified angle. <p><code>crd(a) = 2 sin(a/2)</code> <p><img src="./doc-files/chord.png" alt="[Chord function]"> @param angle the angle. @return the chord of the angle.
[ "Replies", "the", "chord", "of", "the", "specified", "angle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L854-L858
train
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/Point2dfx.java
Point2dfx.convert
public static Point2dfx convert(Tuple2D<?> tuple) { if (tuple instanceof Point2dfx) { return (Point2dfx) tuple; } return new Point2dfx(tuple.getX(), tuple.getY()); }
java
public static Point2dfx convert(Tuple2D<?> tuple) { if (tuple instanceof Point2dfx) { return (Point2dfx) tuple; } return new Point2dfx(tuple.getX(), tuple.getY()); }
[ "public", "static", "Point2dfx", "convert", "(", "Tuple2D", "<", "?", ">", "tuple", ")", "{", "if", "(", "tuple", "instanceof", "Point2dfx", ")", "{", "return", "(", "Point2dfx", ")", "tuple", ";", "}", "return", "new", "Point2dfx", "(", "tuple", ".", ...
Convert the given tuple to a real Point2dfx. <p>If the given tuple is already a Point2dfx, it is replied. @param tuple the tuple. @return the Point2dfx. @since 14.0
[ "Convert", "the", "given", "tuple", "to", "a", "real", "Point2dfx", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/Point2dfx.java#L120-L125
train