@glandais/vcyclist-engine 6.9.1 → 6.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fit-kotlin-sdk.js +3728 -3728
- package/kotlin-kotlin-stdlib.js +9 -9
- package/kotlinx-coroutines-core.js +2 -2
- package/package.json +1 -1
- package/vcyclist-engine.js +1313 -1313
- package/vcyclist-fit.js +170 -170
- package/vcyclist-gpx.js +253 -197
- package/vcyclist-gpx.js.map +1 -1
package/vcyclist-gpx.js
CHANGED
|
@@ -235,6 +235,7 @@
|
|
|
235
235
|
initMetadataForClass(BoundsRad, 'BoundsRad');
|
|
236
236
|
initMetadataForCompanion(Companion_8);
|
|
237
237
|
initMetadataForClass(Path, 'Path', VOID, GeneratedPath);
|
|
238
|
+
initMetadataForClass(Simplified, 'Simplified');
|
|
238
239
|
initMetadataForObject(PathSimplifier, 'PathSimplifier');
|
|
239
240
|
initMetadataForCompanion(Companion_9);
|
|
240
241
|
initMetadataForClass(PointField, 'PointField', VOID, Enum);
|
|
@@ -5060,12 +5061,36 @@
|
|
|
5060
5061
|
return false;
|
|
5061
5062
|
return true;
|
|
5062
5063
|
};
|
|
5064
|
+
function distancesOf($this, path) {
|
|
5065
|
+
var tmp = 0;
|
|
5066
|
+
var tmp_0 = path.q2b_1;
|
|
5067
|
+
var tmp_1 = new Float64Array(tmp_0);
|
|
5068
|
+
while (tmp < tmp_0) {
|
|
5069
|
+
var tmp_2 = tmp;
|
|
5070
|
+
tmp_1[tmp_2] = path.z2j(tmp_2);
|
|
5071
|
+
tmp = tmp + 1 | 0;
|
|
5072
|
+
}
|
|
5073
|
+
return tmp_1;
|
|
5074
|
+
}
|
|
5075
|
+
function elevationsOf($this, path) {
|
|
5076
|
+
var tmp = 0;
|
|
5077
|
+
var tmp_0 = path.q2b_1;
|
|
5078
|
+
var tmp_1 = new Float64Array(tmp_0);
|
|
5079
|
+
while (tmp < tmp_0) {
|
|
5080
|
+
var tmp_2 = tmp;
|
|
5081
|
+
var source = path.a2k(tmp_2);
|
|
5082
|
+
tmp_1[tmp_2] = isNaN_0(source) ? path.v2b(tmp_2) : source;
|
|
5083
|
+
tmp = tmp + 1 | 0;
|
|
5084
|
+
}
|
|
5085
|
+
return tmp_1;
|
|
5086
|
+
}
|
|
5063
5087
|
function Banked(gainM, lossM, legCount) {
|
|
5064
|
-
this.
|
|
5065
|
-
this.
|
|
5066
|
-
this.
|
|
5088
|
+
this.b2k_1 = gainM;
|
|
5089
|
+
this.c2k_1 = lossM;
|
|
5090
|
+
this.d2k_1 = legCount;
|
|
5067
5091
|
}
|
|
5068
|
-
function accumulate($this, h, threshold) {
|
|
5092
|
+
function accumulate($this, h, threshold, risingLegs) {
|
|
5093
|
+
risingLegs = risingLegs === VOID ? null : risingLegs;
|
|
5069
5094
|
var gain = 0.0;
|
|
5070
5095
|
var loss = 0.0;
|
|
5071
5096
|
var legCount = 0;
|
|
@@ -5076,6 +5101,8 @@
|
|
|
5076
5101
|
var dir = 0;
|
|
5077
5102
|
var ref = h[0];
|
|
5078
5103
|
var ext = h[0];
|
|
5104
|
+
var iRef = 0;
|
|
5105
|
+
var iExt = 0;
|
|
5079
5106
|
var inductionVariable = 1;
|
|
5080
5107
|
var last = h.length;
|
|
5081
5108
|
if (inductionVariable < last)
|
|
@@ -5100,35 +5127,59 @@
|
|
|
5100
5127
|
}
|
|
5101
5128
|
dir = 1;
|
|
5102
5129
|
ref = lo;
|
|
5130
|
+
iRef = iLo;
|
|
5103
5131
|
ext = e > hi ? e : hi;
|
|
5132
|
+
iExt = iHi;
|
|
5104
5133
|
} else {
|
|
5105
5134
|
if (hi > h[0]) {
|
|
5106
5135
|
gain = gain + (hi - h[0]);
|
|
5107
5136
|
legCount = legCount + 1 | 0;
|
|
5137
|
+
if (risingLegs == null)
|
|
5138
|
+
null;
|
|
5139
|
+
else {
|
|
5140
|
+
// Inline function 'kotlin.intArrayOf' call
|
|
5141
|
+
var tmp$ret$0 = new Int32Array([0, iHi]);
|
|
5142
|
+
risingLegs.k(tmp$ret$0);
|
|
5143
|
+
}
|
|
5108
5144
|
}
|
|
5109
5145
|
dir = -1;
|
|
5110
5146
|
ref = hi;
|
|
5147
|
+
iRef = iHi;
|
|
5111
5148
|
ext = e < lo ? e : lo;
|
|
5149
|
+
iExt = iLo;
|
|
5112
5150
|
}
|
|
5113
5151
|
}
|
|
5114
5152
|
} else if (dir > 0) {
|
|
5115
5153
|
if (e > ext) {
|
|
5116
5154
|
ext = e;
|
|
5155
|
+
iExt = i;
|
|
5117
5156
|
} else if (ext - e >= threshold) {
|
|
5118
5157
|
gain = gain + (ext - ref);
|
|
5119
5158
|
legCount = legCount + 1 | 0;
|
|
5159
|
+
if (risingLegs == null)
|
|
5160
|
+
null;
|
|
5161
|
+
else {
|
|
5162
|
+
// Inline function 'kotlin.intArrayOf' call
|
|
5163
|
+
var tmp$ret$1 = new Int32Array([iRef, iExt]);
|
|
5164
|
+
risingLegs.k(tmp$ret$1);
|
|
5165
|
+
}
|
|
5120
5166
|
ref = ext;
|
|
5167
|
+
iRef = iExt;
|
|
5121
5168
|
ext = e;
|
|
5169
|
+
iExt = i;
|
|
5122
5170
|
dir = -1;
|
|
5123
5171
|
}
|
|
5124
5172
|
} else {
|
|
5125
5173
|
if (e < ext) {
|
|
5126
5174
|
ext = e;
|
|
5175
|
+
iExt = i;
|
|
5127
5176
|
} else if (e - ext >= threshold) {
|
|
5128
5177
|
loss = loss + (ext - ref);
|
|
5129
5178
|
legCount = legCount + 1 | 0;
|
|
5130
5179
|
ref = ext;
|
|
5180
|
+
iRef = iExt;
|
|
5131
5181
|
ext = e;
|
|
5182
|
+
iExt = i;
|
|
5132
5183
|
dir = 1;
|
|
5133
5184
|
}
|
|
5134
5185
|
}
|
|
@@ -5137,6 +5188,13 @@
|
|
|
5137
5188
|
if (dir > 0 && ext > ref) {
|
|
5138
5189
|
gain = gain + (ext - ref);
|
|
5139
5190
|
legCount = legCount + 1 | 0;
|
|
5191
|
+
if (risingLegs == null)
|
|
5192
|
+
null;
|
|
5193
|
+
else {
|
|
5194
|
+
// Inline function 'kotlin.intArrayOf' call
|
|
5195
|
+
var tmp$ret$2 = new Int32Array([iRef, iExt]);
|
|
5196
|
+
risingLegs.k(tmp$ret$2);
|
|
5197
|
+
}
|
|
5140
5198
|
} else if (dir < 0 && ext < ref) {
|
|
5141
5199
|
loss = loss + (ext - ref);
|
|
5142
5200
|
legCount = legCount + 1 | 0;
|
|
@@ -5145,32 +5203,13 @@
|
|
|
5145
5203
|
}
|
|
5146
5204
|
function ElevationGain() {
|
|
5147
5205
|
}
|
|
5148
|
-
protoOf(ElevationGain).
|
|
5206
|
+
protoOf(ElevationGain).e2k = function (path, options) {
|
|
5149
5207
|
if (path.q2b_1 < 2)
|
|
5150
5208
|
return Companion_instance_5.n2j(options);
|
|
5151
|
-
|
|
5152
|
-
var tmp_0 = path.q2b_1;
|
|
5153
|
-
var tmp_1 = new Float64Array(tmp_0);
|
|
5154
|
-
while (tmp < tmp_0) {
|
|
5155
|
-
var tmp_2 = tmp;
|
|
5156
|
-
tmp_1[tmp_2] = path.d2k(tmp_2);
|
|
5157
|
-
tmp = tmp + 1 | 0;
|
|
5158
|
-
}
|
|
5159
|
-
var distanceM = tmp_1;
|
|
5160
|
-
var tmp_3 = 0;
|
|
5161
|
-
var tmp_4 = path.q2b_1;
|
|
5162
|
-
var tmp_5 = new Float64Array(tmp_4);
|
|
5163
|
-
while (tmp_3 < tmp_4) {
|
|
5164
|
-
var tmp_6 = tmp_3;
|
|
5165
|
-
var source = path.e2k(tmp_6);
|
|
5166
|
-
tmp_5[tmp_6] = isNaN_0(source) ? path.v2b(tmp_6) : source;
|
|
5167
|
-
tmp_3 = tmp_3 + 1 | 0;
|
|
5168
|
-
}
|
|
5169
|
-
var elevationM = tmp_5;
|
|
5170
|
-
return this.f2k(distanceM, elevationM, options);
|
|
5209
|
+
return this.f2k(distancesOf(this, path), elevationsOf(this, path), options);
|
|
5171
5210
|
};
|
|
5172
5211
|
protoOf(ElevationGain).g2k = function (path, options) {
|
|
5173
|
-
var result = this.
|
|
5212
|
+
var result = this.e2k(path, options);
|
|
5174
5213
|
path.f2d_1 = result.s2j_1;
|
|
5175
5214
|
path.g2d_1 = result.t2j_1;
|
|
5176
5215
|
return result;
|
|
@@ -5203,7 +5242,7 @@
|
|
|
5203
5242
|
return new ElevationGainResult(rawGain, rawLoss, rawGain, rawLoss, 0.0, options.r2j_1, 0);
|
|
5204
5243
|
}
|
|
5205
5244
|
var banked = accumulate(this, profile, options.q2j_1);
|
|
5206
|
-
return new ElevationGainResult(banked.
|
|
5245
|
+
return new ElevationGainResult(banked.b2k_1, banked.c2k_1, rawGain, rawLoss, options.q2j_1, options.r2j_1, banked.d2k_1);
|
|
5207
5246
|
};
|
|
5208
5247
|
var ElevationGain_instance;
|
|
5209
5248
|
function ElevationGain_getInstance() {
|
|
@@ -5485,7 +5524,7 @@
|
|
|
5485
5524
|
do {
|
|
5486
5525
|
var i = inductionVariable_0;
|
|
5487
5526
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
5488
|
-
if (isNaN_0(out.
|
|
5527
|
+
if (isNaN_0(out.a2k(i))) {
|
|
5489
5528
|
out.e2l(i, source.v2b(i));
|
|
5490
5529
|
}
|
|
5491
5530
|
out.p2c(i, smoothed.p(i).s12());
|
|
@@ -5569,7 +5608,7 @@
|
|
|
5569
5608
|
protoOf(GeneratedPath).o2c = function (i, v) {
|
|
5570
5609
|
this.r2b_1[imul(i, 44) + 1 | 0] = v;
|
|
5571
5610
|
};
|
|
5572
|
-
protoOf(GeneratedPath).
|
|
5611
|
+
protoOf(GeneratedPath).z2j = function (i) {
|
|
5573
5612
|
return this.r2b_1[imul(i, 44) + 2 | 0];
|
|
5574
5613
|
};
|
|
5575
5614
|
protoOf(GeneratedPath).j2l = function (i, v) {
|
|
@@ -5749,7 +5788,7 @@
|
|
|
5749
5788
|
protoOf(GeneratedPath).b2n = function (i, v) {
|
|
5750
5789
|
this.r2b_1[imul(i, 44) + 42 | 0] = v;
|
|
5751
5790
|
};
|
|
5752
|
-
protoOf(GeneratedPath).
|
|
5791
|
+
protoOf(GeneratedPath).a2k = function (i) {
|
|
5753
5792
|
return this.r2b_1[imul(i, 44) + 43 | 0];
|
|
5754
5793
|
};
|
|
5755
5794
|
protoOf(GeneratedPath).e2l = function (i, v) {
|
|
@@ -5968,7 +6007,7 @@
|
|
|
5968
6007
|
var b_0 = i_0 + 1 | 0;
|
|
5969
6008
|
var ip1 = Math.min(tmp0, b_0);
|
|
5970
6009
|
this.q2l(i_0, computeBearing(this, im1, ip1));
|
|
5971
|
-
var dDist = (this.
|
|
6010
|
+
var dDist = (this.z2j(ip1) - this.z2j(im1)) / 2.0;
|
|
5972
6011
|
var dEle_0 = (this.v2b(ip1) - this.v2b(im1)) / 2.0;
|
|
5973
6012
|
var grade = dDist === 0.0 ? 0.0 : dEle_0 / dDist;
|
|
5974
6013
|
this.s2l(i_0, grade);
|
|
@@ -5979,11 +6018,28 @@
|
|
|
5979
6018
|
}
|
|
5980
6019
|
while (inductionVariable_0 < last_0);
|
|
5981
6020
|
};
|
|
6021
|
+
function Simplified(path, indices) {
|
|
6022
|
+
this.n2n_1 = path;
|
|
6023
|
+
this.o2n_1 = indices;
|
|
6024
|
+
}
|
|
5982
6025
|
function PathSimplifier() {
|
|
5983
6026
|
}
|
|
5984
|
-
protoOf(PathSimplifier).
|
|
5985
|
-
|
|
5986
|
-
|
|
6027
|
+
protoOf(PathSimplifier).p2n = function (path, toleranceM, zExaggeration) {
|
|
6028
|
+
return this.q2n(path, toleranceM, zExaggeration).n2n_1;
|
|
6029
|
+
};
|
|
6030
|
+
protoOf(PathSimplifier).q2n = function (path, toleranceM, zExaggeration) {
|
|
6031
|
+
if (path.q2b_1 <= 2) {
|
|
6032
|
+
var tmp = path.m2n();
|
|
6033
|
+
var tmp_0 = 0;
|
|
6034
|
+
var tmp_1 = path.q2b_1;
|
|
6035
|
+
var tmp_2 = new Int32Array(tmp_1);
|
|
6036
|
+
while (tmp_0 < tmp_1) {
|
|
6037
|
+
var tmp_3 = tmp_0;
|
|
6038
|
+
tmp_2[tmp_3] = tmp_3;
|
|
6039
|
+
tmp_0 = tmp_0 + 1 | 0;
|
|
6040
|
+
}
|
|
6041
|
+
return new Simplified(tmp, tmp_2);
|
|
6042
|
+
}
|
|
5987
6043
|
var coords = ArrayList_init_$Create$_0(path.q2b_1);
|
|
5988
6044
|
var inductionVariable = 0;
|
|
5989
6045
|
var last = path.q2b_1;
|
|
@@ -6032,7 +6088,7 @@
|
|
|
6032
6088
|
out.f2d_1 = path.f2d_1;
|
|
6033
6089
|
out.g2d_1 = path.g2d_1;
|
|
6034
6090
|
out.h2d_1 = path.h2d_1;
|
|
6035
|
-
return out;
|
|
6091
|
+
return new Simplified(out, toIntArray(retainedIndices));
|
|
6036
6092
|
};
|
|
6037
6093
|
var PathSimplifier_instance;
|
|
6038
6094
|
function PathSimplifier_getInstance() {
|
|
@@ -6138,7 +6194,7 @@
|
|
|
6138
6194
|
var PointField_SOURCE_ELEVATION_instance;
|
|
6139
6195
|
function Companion_9() {
|
|
6140
6196
|
Companion_instance_10 = this;
|
|
6141
|
-
this.
|
|
6197
|
+
this.r2n_1 = 44;
|
|
6142
6198
|
var tmp = this;
|
|
6143
6199
|
// Inline function 'kotlin.collections.associateBy' call
|
|
6144
6200
|
var this_0 = get_entries_3();
|
|
@@ -6151,10 +6207,10 @@
|
|
|
6151
6207
|
var tmp$ret$2 = element.l2e_1;
|
|
6152
6208
|
destination.v3(tmp$ret$2, element);
|
|
6153
6209
|
}
|
|
6154
|
-
tmp.
|
|
6210
|
+
tmp.s2n_1 = destination;
|
|
6155
6211
|
}
|
|
6156
|
-
protoOf(Companion_9).
|
|
6157
|
-
return this.
|
|
6212
|
+
protoOf(Companion_9).t2n = function (prop) {
|
|
6213
|
+
return this.s2n_1.t1(prop);
|
|
6158
6214
|
};
|
|
6159
6215
|
var Companion_instance_10;
|
|
6160
6216
|
function Companion_getInstance_9() {
|
|
@@ -6399,8 +6455,8 @@
|
|
|
6399
6455
|
var PointFieldCategory_ROAD_instance;
|
|
6400
6456
|
function PointFieldCategory(name, ordinal, id, displayName) {
|
|
6401
6457
|
Enum.call(this, name, ordinal);
|
|
6402
|
-
this.
|
|
6403
|
-
this.
|
|
6458
|
+
this.w2n_1 = id;
|
|
6459
|
+
this.x2n_1 = displayName;
|
|
6404
6460
|
}
|
|
6405
6461
|
function PointFieldCategory_COORDINATES_getInstance() {
|
|
6406
6462
|
static_init_5();
|
|
@@ -6463,35 +6519,35 @@
|
|
|
6463
6519
|
return PointFieldCategory_ROAD_instance;
|
|
6464
6520
|
}
|
|
6465
6521
|
function Copy(sourceIndex) {
|
|
6466
|
-
this.
|
|
6522
|
+
this.y2n_1 = sourceIndex;
|
|
6467
6523
|
}
|
|
6468
6524
|
protoOf(Copy).toString = function () {
|
|
6469
|
-
return 'Copy(sourceIndex=' + this.
|
|
6525
|
+
return 'Copy(sourceIndex=' + this.y2n_1 + ')';
|
|
6470
6526
|
};
|
|
6471
6527
|
protoOf(Copy).hashCode = function () {
|
|
6472
|
-
return this.
|
|
6528
|
+
return this.y2n_1;
|
|
6473
6529
|
};
|
|
6474
6530
|
protoOf(Copy).equals = function (other) {
|
|
6475
6531
|
if (this === other)
|
|
6476
6532
|
return true;
|
|
6477
6533
|
if (!(other instanceof Copy))
|
|
6478
6534
|
return false;
|
|
6479
|
-
if (!(this.
|
|
6535
|
+
if (!(this.y2n_1 === other.y2n_1))
|
|
6480
6536
|
return false;
|
|
6481
6537
|
return true;
|
|
6482
6538
|
};
|
|
6483
6539
|
function Interpolate(from, to, coef) {
|
|
6484
|
-
this.
|
|
6485
|
-
this.
|
|
6486
|
-
this.
|
|
6540
|
+
this.z2n_1 = from;
|
|
6541
|
+
this.a2o_1 = to;
|
|
6542
|
+
this.b2o_1 = coef;
|
|
6487
6543
|
}
|
|
6488
6544
|
protoOf(Interpolate).toString = function () {
|
|
6489
|
-
return 'Interpolate(from=' + this.
|
|
6545
|
+
return 'Interpolate(from=' + this.z2n_1 + ', to=' + this.a2o_1 + ', coef=' + this.b2o_1 + ')';
|
|
6490
6546
|
};
|
|
6491
6547
|
protoOf(Interpolate).hashCode = function () {
|
|
6492
|
-
var result = this.
|
|
6493
|
-
result = imul(result, 31) + this.
|
|
6494
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
6548
|
+
var result = this.z2n_1;
|
|
6549
|
+
result = imul(result, 31) + this.a2o_1 | 0;
|
|
6550
|
+
result = imul(result, 31) + getNumberHashCode(this.b2o_1) | 0;
|
|
6495
6551
|
return result;
|
|
6496
6552
|
};
|
|
6497
6553
|
protoOf(Interpolate).equals = function (other) {
|
|
@@ -6499,11 +6555,11 @@
|
|
|
6499
6555
|
return true;
|
|
6500
6556
|
if (!(other instanceof Interpolate))
|
|
6501
6557
|
return false;
|
|
6502
|
-
if (!(this.
|
|
6558
|
+
if (!(this.z2n_1 === other.z2n_1))
|
|
6503
6559
|
return false;
|
|
6504
|
-
if (!(this.
|
|
6560
|
+
if (!(this.a2o_1 === other.a2o_1))
|
|
6505
6561
|
return false;
|
|
6506
|
-
if (!equals(this.
|
|
6562
|
+
if (!equals(this.b2o_1, other.b2o_1))
|
|
6507
6563
|
return false;
|
|
6508
6564
|
return true;
|
|
6509
6565
|
};
|
|
@@ -6513,14 +6569,14 @@
|
|
|
6513
6569
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
6514
6570
|
var element = new Copy(0);
|
|
6515
6571
|
plan.k(element);
|
|
6516
|
-
var lastAddedDistance = source.
|
|
6572
|
+
var lastAddedDistance = source.z2j(0);
|
|
6517
6573
|
var lastAddedIndex = 0;
|
|
6518
6574
|
var inductionVariable = 1;
|
|
6519
6575
|
if (inductionVariable < n)
|
|
6520
6576
|
$l$loop: do {
|
|
6521
6577
|
var i = inductionVariable;
|
|
6522
6578
|
inductionVariable = inductionVariable + 1 | 0;
|
|
6523
|
-
var curDist = source.
|
|
6579
|
+
var curDist = source.z2j(i);
|
|
6524
6580
|
var gap = curDist - lastAddedDistance;
|
|
6525
6581
|
if (gap < minDistanceM)
|
|
6526
6582
|
continue $l$loop;
|
|
@@ -6543,11 +6599,11 @@
|
|
|
6543
6599
|
var j = inductionVariable_0;
|
|
6544
6600
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
6545
6601
|
var targetDistance = lastAddedDistance + j * spacing;
|
|
6546
|
-
while (index1 < (i - 1 | 0) && source.
|
|
6602
|
+
while (index1 < (i - 1 | 0) && source.z2j(index1 + 1 | 0) < targetDistance) {
|
|
6547
6603
|
index1 = index1 + 1 | 0;
|
|
6548
6604
|
}
|
|
6549
|
-
var dist1 = source.
|
|
6550
|
-
var dist2 = source.
|
|
6605
|
+
var dist1 = source.z2j(index1);
|
|
6606
|
+
var dist2 = source.z2j(index1 + 1 | 0);
|
|
6551
6607
|
var coef = (targetDistance - dist1) / (dist2 - dist1);
|
|
6552
6608
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
6553
6609
|
var element_1 = new Interpolate(index1, index1 + 1 | 0, coef);
|
|
@@ -6573,10 +6629,10 @@
|
|
|
6573
6629
|
index = index + 1 | 0;
|
|
6574
6630
|
var op = iterator.n();
|
|
6575
6631
|
if (op instanceof Copy) {
|
|
6576
|
-
copyFields($this, source, op.
|
|
6632
|
+
copyFields($this, source, op.y2n_1, out, dstIdx);
|
|
6577
6633
|
} else {
|
|
6578
6634
|
if (op instanceof Interpolate) {
|
|
6579
|
-
FieldInterpolation_getInstance().h2l(source, op.
|
|
6635
|
+
FieldInterpolation_getInstance().h2l(source, op.z2n_1, op.a2o_1, op.b2o_1, out, dstIdx);
|
|
6580
6636
|
} else {
|
|
6581
6637
|
noWhenBranchMatchedException();
|
|
6582
6638
|
}
|
|
@@ -6594,10 +6650,10 @@
|
|
|
6594
6650
|
}
|
|
6595
6651
|
function PointPerDistance() {
|
|
6596
6652
|
}
|
|
6597
|
-
protoOf(PointPerDistance).
|
|
6598
|
-
return this.
|
|
6653
|
+
protoOf(PointPerDistance).c2o = function (source, minDistanceM, maxDistanceM) {
|
|
6654
|
+
return this.d2o(source, minDistanceM, maxDistanceM);
|
|
6599
6655
|
};
|
|
6600
|
-
protoOf(PointPerDistance).
|
|
6656
|
+
protoOf(PointPerDistance).d2o = function (source, minDistanceM, maxDistanceM) {
|
|
6601
6657
|
// Inline function 'kotlin.require' call
|
|
6602
6658
|
if (!(maxDistanceM > 0.0)) {
|
|
6603
6659
|
var message = 'maxDistanceM must be > 0, got ' + maxDistanceM;
|
|
@@ -6619,35 +6675,35 @@
|
|
|
6619
6675
|
return PointPerDistance_instance;
|
|
6620
6676
|
}
|
|
6621
6677
|
function Copy_0(sourceIndex) {
|
|
6622
|
-
this.
|
|
6678
|
+
this.e2o_1 = sourceIndex;
|
|
6623
6679
|
}
|
|
6624
6680
|
protoOf(Copy_0).toString = function () {
|
|
6625
|
-
return 'Copy(sourceIndex=' + this.
|
|
6681
|
+
return 'Copy(sourceIndex=' + this.e2o_1 + ')';
|
|
6626
6682
|
};
|
|
6627
6683
|
protoOf(Copy_0).hashCode = function () {
|
|
6628
|
-
return this.
|
|
6684
|
+
return this.e2o_1;
|
|
6629
6685
|
};
|
|
6630
6686
|
protoOf(Copy_0).equals = function (other) {
|
|
6631
6687
|
if (this === other)
|
|
6632
6688
|
return true;
|
|
6633
6689
|
if (!(other instanceof Copy_0))
|
|
6634
6690
|
return false;
|
|
6635
|
-
if (!(this.
|
|
6691
|
+
if (!(this.e2o_1 === other.e2o_1))
|
|
6636
6692
|
return false;
|
|
6637
6693
|
return true;
|
|
6638
6694
|
};
|
|
6639
6695
|
function Interpolate_0(from, to, coef) {
|
|
6640
|
-
this.
|
|
6641
|
-
this.
|
|
6642
|
-
this.
|
|
6696
|
+
this.f2o_1 = from;
|
|
6697
|
+
this.g2o_1 = to;
|
|
6698
|
+
this.h2o_1 = coef;
|
|
6643
6699
|
}
|
|
6644
6700
|
protoOf(Interpolate_0).toString = function () {
|
|
6645
|
-
return 'Interpolate(from=' + this.
|
|
6701
|
+
return 'Interpolate(from=' + this.f2o_1 + ', to=' + this.g2o_1 + ', coef=' + this.h2o_1 + ')';
|
|
6646
6702
|
};
|
|
6647
6703
|
protoOf(Interpolate_0).hashCode = function () {
|
|
6648
|
-
var result = this.
|
|
6649
|
-
result = imul(result, 31) + this.
|
|
6650
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
6704
|
+
var result = this.f2o_1;
|
|
6705
|
+
result = imul(result, 31) + this.g2o_1 | 0;
|
|
6706
|
+
result = imul(result, 31) + getNumberHashCode(this.h2o_1) | 0;
|
|
6651
6707
|
return result;
|
|
6652
6708
|
};
|
|
6653
6709
|
protoOf(Interpolate_0).equals = function (other) {
|
|
@@ -6655,11 +6711,11 @@
|
|
|
6655
6711
|
return true;
|
|
6656
6712
|
if (!(other instanceof Interpolate_0))
|
|
6657
6713
|
return false;
|
|
6658
|
-
if (!(this.
|
|
6714
|
+
if (!(this.f2o_1 === other.f2o_1))
|
|
6659
6715
|
return false;
|
|
6660
|
-
if (!(this.
|
|
6716
|
+
if (!(this.g2o_1 === other.g2o_1))
|
|
6661
6717
|
return false;
|
|
6662
|
-
if (!equals(this.
|
|
6718
|
+
if (!equals(this.h2o_1, other.h2o_1))
|
|
6663
6719
|
return false;
|
|
6664
6720
|
return true;
|
|
6665
6721
|
};
|
|
@@ -6737,10 +6793,10 @@
|
|
|
6737
6793
|
}
|
|
6738
6794
|
var data = tmp;
|
|
6739
6795
|
if (data instanceof Copy_0) {
|
|
6740
|
-
copyFields_0($this, source, data.
|
|
6796
|
+
copyFields_0($this, source, data.e2o_1, out, idx);
|
|
6741
6797
|
} else {
|
|
6742
6798
|
if (data instanceof Interpolate_0) {
|
|
6743
|
-
FieldInterpolation_getInstance().h2l(source, data.
|
|
6799
|
+
FieldInterpolation_getInstance().h2l(source, data.f2o_1, data.g2o_1, data.h2o_1, out, idx);
|
|
6744
6800
|
} else {
|
|
6745
6801
|
noWhenBranchMatchedException();
|
|
6746
6802
|
}
|
|
@@ -6759,7 +6815,7 @@
|
|
|
6759
6815
|
}
|
|
6760
6816
|
function PointPerSecond() {
|
|
6761
6817
|
}
|
|
6762
|
-
protoOf(PointPerSecond).
|
|
6818
|
+
protoOf(PointPerSecond).i2o = function (source) {
|
|
6763
6819
|
if (source.q2b_1 === 0)
|
|
6764
6820
|
return new Path(0);
|
|
6765
6821
|
var plan = buildPlan_0(this, source);
|
|
@@ -6770,33 +6826,33 @@
|
|
|
6770
6826
|
return PointPerSecond_instance;
|
|
6771
6827
|
}
|
|
6772
6828
|
function TunnelSpan(first, last, chordGrade, heightM, riseGrade, fallGrade, straightness, stepM) {
|
|
6773
|
-
this.
|
|
6774
|
-
this.
|
|
6775
|
-
this.
|
|
6776
|
-
this.
|
|
6777
|
-
this.
|
|
6778
|
-
this.
|
|
6779
|
-
this.
|
|
6780
|
-
this.
|
|
6829
|
+
this.j2o_1 = first;
|
|
6830
|
+
this.k2o_1 = last;
|
|
6831
|
+
this.l2o_1 = chordGrade;
|
|
6832
|
+
this.m2o_1 = heightM;
|
|
6833
|
+
this.n2o_1 = riseGrade;
|
|
6834
|
+
this.o2o_1 = fallGrade;
|
|
6835
|
+
this.p2o_1 = straightness;
|
|
6836
|
+
this.q2o_1 = stepM;
|
|
6781
6837
|
}
|
|
6782
|
-
protoOf(TunnelSpan).
|
|
6783
|
-
return this.
|
|
6838
|
+
protoOf(TunnelSpan).r2o = function () {
|
|
6839
|
+
return this.j2o_1 * this.q2o_1;
|
|
6784
6840
|
};
|
|
6785
|
-
protoOf(TunnelSpan).
|
|
6786
|
-
return this.
|
|
6841
|
+
protoOf(TunnelSpan).s2o = function () {
|
|
6842
|
+
return this.k2o_1 * this.q2o_1;
|
|
6787
6843
|
};
|
|
6788
6844
|
protoOf(TunnelSpan).toString = function () {
|
|
6789
|
-
return 'TunnelSpan(first=' + this.
|
|
6845
|
+
return 'TunnelSpan(first=' + this.j2o_1 + ', last=' + this.k2o_1 + ', chordGrade=' + this.l2o_1 + ', heightM=' + this.m2o_1 + ', riseGrade=' + this.n2o_1 + ', fallGrade=' + this.o2o_1 + ', straightness=' + this.p2o_1 + ', stepM=' + this.q2o_1 + ')';
|
|
6790
6846
|
};
|
|
6791
6847
|
protoOf(TunnelSpan).hashCode = function () {
|
|
6792
|
-
var result = this.
|
|
6793
|
-
result = imul(result, 31) + this.
|
|
6794
|
-
result = imul(result, 31) + getNumberHashCode(this.i2o_1) | 0;
|
|
6795
|
-
result = imul(result, 31) + getNumberHashCode(this.j2o_1) | 0;
|
|
6796
|
-
result = imul(result, 31) + getNumberHashCode(this.k2o_1) | 0;
|
|
6848
|
+
var result = this.j2o_1;
|
|
6849
|
+
result = imul(result, 31) + this.k2o_1 | 0;
|
|
6797
6850
|
result = imul(result, 31) + getNumberHashCode(this.l2o_1) | 0;
|
|
6798
6851
|
result = imul(result, 31) + getNumberHashCode(this.m2o_1) | 0;
|
|
6799
6852
|
result = imul(result, 31) + getNumberHashCode(this.n2o_1) | 0;
|
|
6853
|
+
result = imul(result, 31) + getNumberHashCode(this.o2o_1) | 0;
|
|
6854
|
+
result = imul(result, 31) + getNumberHashCode(this.p2o_1) | 0;
|
|
6855
|
+
result = imul(result, 31) + getNumberHashCode(this.q2o_1) | 0;
|
|
6800
6856
|
return result;
|
|
6801
6857
|
};
|
|
6802
6858
|
protoOf(TunnelSpan).equals = function (other) {
|
|
@@ -6804,15 +6860,9 @@
|
|
|
6804
6860
|
return true;
|
|
6805
6861
|
if (!(other instanceof TunnelSpan))
|
|
6806
6862
|
return false;
|
|
6807
|
-
if (!(this.
|
|
6808
|
-
return false;
|
|
6809
|
-
if (!(this.h2o_1 === other.h2o_1))
|
|
6810
|
-
return false;
|
|
6811
|
-
if (!equals(this.i2o_1, other.i2o_1))
|
|
6812
|
-
return false;
|
|
6813
|
-
if (!equals(this.j2o_1, other.j2o_1))
|
|
6863
|
+
if (!(this.j2o_1 === other.j2o_1))
|
|
6814
6864
|
return false;
|
|
6815
|
-
if (!
|
|
6865
|
+
if (!(this.k2o_1 === other.k2o_1))
|
|
6816
6866
|
return false;
|
|
6817
6867
|
if (!equals(this.l2o_1, other.l2o_1))
|
|
6818
6868
|
return false;
|
|
@@ -6820,30 +6870,36 @@
|
|
|
6820
6870
|
return false;
|
|
6821
6871
|
if (!equals(this.n2o_1, other.n2o_1))
|
|
6822
6872
|
return false;
|
|
6873
|
+
if (!equals(this.o2o_1, other.o2o_1))
|
|
6874
|
+
return false;
|
|
6875
|
+
if (!equals(this.p2o_1, other.p2o_1))
|
|
6876
|
+
return false;
|
|
6877
|
+
if (!equals(this.q2o_1, other.q2o_1))
|
|
6878
|
+
return false;
|
|
6823
6879
|
return true;
|
|
6824
6880
|
};
|
|
6825
6881
|
function Stations(options) {
|
|
6826
|
-
this.q2o_1 = options.j2p();
|
|
6827
|
-
this.r2o_1 = options.k2p();
|
|
6828
|
-
this.s2o_1 = options.l2p();
|
|
6829
6882
|
this.t2o_1 = options.m2p();
|
|
6883
|
+
this.u2o_1 = options.n2p();
|
|
6884
|
+
this.v2o_1 = options.o2p();
|
|
6885
|
+
this.w2o_1 = options.p2p();
|
|
6830
6886
|
}
|
|
6831
6887
|
function grade($this, z, i, j, stepM) {
|
|
6832
6888
|
return i < 0 || j >= z.length ? NaN : (z[j] - z[i]) / ((j - i | 0) * stepM);
|
|
6833
6889
|
}
|
|
6834
6890
|
function judge($this, profile, a, b, entries, exits, options, stations) {
|
|
6835
|
-
var w = stations.
|
|
6836
|
-
var z = profile.
|
|
6891
|
+
var w = stations.u2o_1;
|
|
6892
|
+
var z = profile.q2p_1;
|
|
6837
6893
|
var n = z.length;
|
|
6838
|
-
var step = options.
|
|
6894
|
+
var step = options.x2o_1;
|
|
6839
6895
|
var length = (b - a | 0) * step;
|
|
6840
|
-
if (length < options.
|
|
6896
|
+
if (length < options.j2p_1 - 1.0E-9)
|
|
6841
6897
|
return null;
|
|
6842
|
-
var chord = Distance_instance.n12(new LatLon(profile.
|
|
6898
|
+
var chord = Distance_instance.n12(new LatLon(profile.r2p_1[a], profile.s2p_1[a]), new LatLon(profile.r2p_1[b], profile.s2p_1[b]));
|
|
6843
6899
|
var straightness = chord / length;
|
|
6844
|
-
if (!(straightness >= options.
|
|
6900
|
+
if (!(straightness >= options.l2p_1))
|
|
6845
6901
|
return null;
|
|
6846
|
-
var w0 = stations.
|
|
6902
|
+
var w0 = stations.u2o_1;
|
|
6847
6903
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
6848
6904
|
var b_0 = a - w0 | 0;
|
|
6849
6905
|
var inductionVariable = Math.max(0, b_0);
|
|
@@ -6874,7 +6930,7 @@
|
|
|
6874
6930
|
while (!(k_0 === last));
|
|
6875
6931
|
var c = (z[b] - z[a]) / length;
|
|
6876
6932
|
// Inline function 'kotlin.math.abs' call
|
|
6877
|
-
if (!(Math.abs(c) <= options.
|
|
6933
|
+
if (!(Math.abs(c) <= options.e2p_1))
|
|
6878
6934
|
return null;
|
|
6879
6935
|
var height = -Infinity;
|
|
6880
6936
|
var inductionVariable_1 = a;
|
|
@@ -6883,15 +6939,15 @@
|
|
|
6883
6939
|
var k_1 = inductionVariable_1;
|
|
6884
6940
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
6885
6941
|
var h = z[k_1] - (z[a] + c * (k_1 - a | 0) * step);
|
|
6886
|
-
if (isNaN_0(h) || h < -options.
|
|
6942
|
+
if (isNaN_0(h) || h < -options.h2p_1)
|
|
6887
6943
|
return null;
|
|
6888
6944
|
if (h > height)
|
|
6889
6945
|
height = h;
|
|
6890
6946
|
}
|
|
6891
6947
|
while (!(k_1 === b));
|
|
6892
|
-
if (height < options.
|
|
6948
|
+
if (height < options.f2p_1)
|
|
6893
6949
|
return null;
|
|
6894
|
-
var f = stations.
|
|
6950
|
+
var f = stations.w2o_1;
|
|
6895
6951
|
var nearEntry = -Infinity;
|
|
6896
6952
|
var inductionVariable_2 = a;
|
|
6897
6953
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
@@ -6921,9 +6977,9 @@
|
|
|
6921
6977
|
nearExit = Math.max(tmp0_1, b_5);
|
|
6922
6978
|
}
|
|
6923
6979
|
while (!(k_3 === b));
|
|
6924
|
-
if (nearEntry < options.
|
|
6980
|
+
if (nearEntry < options.f2p_1 || nearExit < options.f2p_1)
|
|
6925
6981
|
return null;
|
|
6926
|
-
var s = stations.
|
|
6982
|
+
var s = stations.v2o_1;
|
|
6927
6983
|
var rise = -Infinity;
|
|
6928
6984
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
6929
6985
|
var b_6 = a - (w / 2 | 0) | 0;
|
|
@@ -6955,7 +7011,7 @@
|
|
|
6955
7011
|
fall = g_0;
|
|
6956
7012
|
}
|
|
6957
7013
|
while (!(k_5 === last_2));
|
|
6958
|
-
if (rise < options.
|
|
7014
|
+
if (rise < options.c2p_1 || fall > -options.c2p_1)
|
|
6959
7015
|
return null;
|
|
6960
7016
|
// Inline function 'kotlin.collections.filter' call
|
|
6961
7017
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -6992,7 +7048,7 @@
|
|
|
6992
7048
|
do {
|
|
6993
7049
|
var k_6 = inductionVariable_6;
|
|
6994
7050
|
inductionVariable_6 = inductionVariable_6 + 1 | 0;
|
|
6995
|
-
if (z[k_6] - (z[a] + c * (k_6 - a | 0) * step) < options.
|
|
7051
|
+
if (z[k_6] - (z[a] + c * (k_6 - a | 0) * step) < options.i2p_1)
|
|
6996
7052
|
return null;
|
|
6997
7053
|
}
|
|
6998
7054
|
while (!(k_6 === y));
|
|
@@ -7001,15 +7057,15 @@
|
|
|
7001
7057
|
return new TunnelSpan(a, b, c, height, rise, fall, straightness, step);
|
|
7002
7058
|
}
|
|
7003
7059
|
function TunnelDetector() {
|
|
7004
|
-
this.
|
|
7060
|
+
this.t2p_1 = 1.0E-6;
|
|
7005
7061
|
}
|
|
7006
|
-
protoOf(TunnelDetector).
|
|
7007
|
-
var z = profile.
|
|
7062
|
+
protoOf(TunnelDetector).u2p = function (profile, options) {
|
|
7063
|
+
var z = profile.q2p_1;
|
|
7008
7064
|
if (z.length < 2)
|
|
7009
7065
|
return emptyList();
|
|
7010
7066
|
var stations = new Stations(options);
|
|
7011
|
-
var entries = this.
|
|
7012
|
-
var exits = this.
|
|
7067
|
+
var entries = this.v2p(z, options, true, stations);
|
|
7068
|
+
var exits = this.v2p(z, options, false, stations);
|
|
7013
7069
|
var out = ArrayList_init_$Create$();
|
|
7014
7070
|
var next = -1;
|
|
7015
7071
|
var _iterator__ex2g4s = entries.l();
|
|
@@ -7023,7 +7079,7 @@
|
|
|
7023
7079
|
var b = _iterator__ex2g4s_0.n();
|
|
7024
7080
|
if (b <= a)
|
|
7025
7081
|
continue $l$loop_2;
|
|
7026
|
-
if ((b - a | 0) * options.
|
|
7082
|
+
if ((b - a | 0) * options.x2o_1 > options.k2p_1 + 1.0E-9)
|
|
7027
7083
|
break $l$loop_2;
|
|
7028
7084
|
var tmp0_elvis_lhs = judge(this, profile, a, b, entries, exits, options, stations);
|
|
7029
7085
|
var tmp;
|
|
@@ -7033,23 +7089,23 @@
|
|
|
7033
7089
|
tmp = tmp0_elvis_lhs;
|
|
7034
7090
|
}
|
|
7035
7091
|
var span = tmp;
|
|
7036
|
-
if (best == null || span.
|
|
7092
|
+
if (best == null || span.m2o_1 > best.m2o_1 + 1.0E-9)
|
|
7037
7093
|
best = span;
|
|
7038
7094
|
}
|
|
7039
7095
|
if (!(best == null)) {
|
|
7040
7096
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
7041
7097
|
var element = best;
|
|
7042
7098
|
out.k(element);
|
|
7043
|
-
next = best.
|
|
7099
|
+
next = best.k2o_1;
|
|
7044
7100
|
}
|
|
7045
7101
|
}
|
|
7046
7102
|
return out;
|
|
7047
7103
|
};
|
|
7048
|
-
protoOf(TunnelDetector).
|
|
7104
|
+
protoOf(TunnelDetector).v2p = function (z, options, entry, stations) {
|
|
7049
7105
|
var n = z.length;
|
|
7050
|
-
var m = stations.
|
|
7051
|
-
var w = stations.
|
|
7052
|
-
var step = options.
|
|
7106
|
+
var m = stations.t2o_1;
|
|
7107
|
+
var w = stations.u2o_1;
|
|
7108
|
+
var step = options.x2o_1;
|
|
7053
7109
|
var tmp = 0;
|
|
7054
7110
|
var tmp_0 = new Float64Array(n);
|
|
7055
7111
|
while (tmp < n) {
|
|
@@ -7072,14 +7128,14 @@
|
|
|
7072
7128
|
var tmp_2;
|
|
7073
7129
|
var tmp_3;
|
|
7074
7130
|
// Inline function 'kotlin.math.abs' call
|
|
7075
|
-
if (Math.abs(back) <= options.
|
|
7131
|
+
if (Math.abs(back) <= options.a2p_1) {
|
|
7076
7132
|
// Inline function 'kotlin.math.abs' call
|
|
7077
|
-
tmp_3 = Math.abs(outer) <= options.
|
|
7133
|
+
tmp_3 = Math.abs(outer) <= options.a2p_1;
|
|
7078
7134
|
} else {
|
|
7079
7135
|
tmp_3 = false;
|
|
7080
7136
|
}
|
|
7081
7137
|
if (tmp_3) {
|
|
7082
|
-
tmp_2 = ahead >= options.
|
|
7138
|
+
tmp_2 = ahead >= options.b2p_1;
|
|
7083
7139
|
} else {
|
|
7084
7140
|
tmp_2 = false;
|
|
7085
7141
|
}
|
|
@@ -7089,14 +7145,14 @@
|
|
|
7089
7145
|
var tmp_4;
|
|
7090
7146
|
var tmp_5;
|
|
7091
7147
|
// Inline function 'kotlin.math.abs' call
|
|
7092
|
-
if (Math.abs(ahead) <= options.
|
|
7148
|
+
if (Math.abs(ahead) <= options.a2p_1) {
|
|
7093
7149
|
// Inline function 'kotlin.math.abs' call
|
|
7094
|
-
tmp_5 = Math.abs(outer_0) <= options.
|
|
7150
|
+
tmp_5 = Math.abs(outer_0) <= options.a2p_1;
|
|
7095
7151
|
} else {
|
|
7096
7152
|
tmp_5 = false;
|
|
7097
7153
|
}
|
|
7098
7154
|
if (tmp_5) {
|
|
7099
|
-
tmp_4 = back <= -options.
|
|
7155
|
+
tmp_4 = back <= -options.b2p_1;
|
|
7100
7156
|
} else {
|
|
7101
7157
|
tmp_4 = false;
|
|
7102
7158
|
}
|
|
@@ -7172,30 +7228,30 @@
|
|
|
7172
7228
|
return TunnelDetector_instance;
|
|
7173
7229
|
}
|
|
7174
7230
|
function TunnelProfile(terrainM, latDeg, lonDeg) {
|
|
7175
|
-
this.
|
|
7176
|
-
this.
|
|
7177
|
-
this.
|
|
7231
|
+
this.q2p_1 = terrainM;
|
|
7232
|
+
this.r2p_1 = latDeg;
|
|
7233
|
+
this.s2p_1 = lonDeg;
|
|
7178
7234
|
// Inline function 'kotlin.require' call
|
|
7179
|
-
if (!(this.
|
|
7180
|
-
var message = 'terrain, latitude and longitude must have one sample per station: ' + this.
|
|
7235
|
+
if (!(this.q2p_1.length === this.r2p_1.length && this.r2p_1.length === this.s2p_1.length)) {
|
|
7236
|
+
var message = 'terrain, latitude and longitude must have one sample per station: ' + this.q2p_1.length + ', ' + this.r2p_1.length + ', ' + this.s2p_1.length;
|
|
7181
7237
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message));
|
|
7182
7238
|
}
|
|
7183
7239
|
}
|
|
7184
7240
|
function stations_0($this, metres, name) {
|
|
7185
|
-
var r = metres / $this.
|
|
7241
|
+
var r = metres / $this.x2o_1;
|
|
7186
7242
|
var k = roundToInt(r);
|
|
7187
7243
|
// Inline function 'kotlin.math.abs' call
|
|
7188
7244
|
var x = r - k;
|
|
7189
7245
|
// Inline function 'kotlin.require' call
|
|
7190
7246
|
if (!(Math.abs(x) < 1.0E-9)) {
|
|
7191
|
-
var message = name + ' = ' + metres + ' m is not a whole number of ' + $this.
|
|
7247
|
+
var message = name + ' = ' + metres + ' m is not a whole number of ' + $this.x2o_1 + ' m stations';
|
|
7192
7248
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message));
|
|
7193
7249
|
}
|
|
7194
7250
|
return k;
|
|
7195
7251
|
}
|
|
7196
7252
|
function Companion_10() {
|
|
7197
7253
|
Companion_instance_11 = this;
|
|
7198
|
-
this.
|
|
7254
|
+
this.w2p_1 = new TunnelDetectorOptions();
|
|
7199
7255
|
}
|
|
7200
7256
|
var Companion_instance_11;
|
|
7201
7257
|
function Companion_getInstance_10() {
|
|
@@ -7220,85 +7276,82 @@
|
|
|
7220
7276
|
minLengthM = minLengthM === VOID ? 50.0 : minLengthM;
|
|
7221
7277
|
maxLengthM = maxLengthM === VOID ? 3000.0 : maxLengthM;
|
|
7222
7278
|
minStraightness = minStraightness === VOID ? 0.8 : minStraightness;
|
|
7223
|
-
this.
|
|
7224
|
-
this.
|
|
7225
|
-
this.
|
|
7226
|
-
this.
|
|
7227
|
-
this.
|
|
7228
|
-
this.
|
|
7229
|
-
this.
|
|
7230
|
-
this.
|
|
7231
|
-
this.
|
|
7232
|
-
this.
|
|
7233
|
-
this.
|
|
7234
|
-
this.
|
|
7235
|
-
this.
|
|
7236
|
-
this.
|
|
7237
|
-
this.
|
|
7279
|
+
this.x2o_1 = stepM;
|
|
7280
|
+
this.y2o_1 = footWindowM;
|
|
7281
|
+
this.z2o_1 = steepWindowM;
|
|
7282
|
+
this.a2p_1 = maxRoadGrade;
|
|
7283
|
+
this.b2p_1 = minPortalGrade;
|
|
7284
|
+
this.c2p_1 = minSideGrade;
|
|
7285
|
+
this.d2p_1 = sideSearchM;
|
|
7286
|
+
this.e2p_1 = maxChordGrade;
|
|
7287
|
+
this.f2p_1 = minHeightM;
|
|
7288
|
+
this.g2p_1 = faceReachM;
|
|
7289
|
+
this.h2p_1 = maxBelowChordM;
|
|
7290
|
+
this.i2p_1 = minValleyHeightM;
|
|
7291
|
+
this.j2p_1 = minLengthM;
|
|
7292
|
+
this.k2p_1 = maxLengthM;
|
|
7293
|
+
this.l2p_1 = minStraightness;
|
|
7238
7294
|
// Inline function 'kotlin.require' call
|
|
7239
|
-
if (!(this.
|
|
7240
|
-
var message = 'stepM must be positive, got ' + this.
|
|
7295
|
+
if (!(this.x2o_1 > 0.0)) {
|
|
7296
|
+
var message = 'stepM must be positive, got ' + this.x2o_1;
|
|
7241
7297
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message));
|
|
7242
7298
|
}
|
|
7243
7299
|
// Inline function 'kotlin.require' call
|
|
7244
|
-
if (!(this.
|
|
7300
|
+
if (!(this.m2p() >= 1 && this.n2p() >= 1)) {
|
|
7245
7301
|
var message_0 = 'grade windows must cover a station';
|
|
7246
7302
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message_0));
|
|
7247
7303
|
}
|
|
7248
7304
|
// Inline function 'kotlin.require' call
|
|
7249
|
-
if (!(this.
|
|
7305
|
+
if (!(this.o2p() >= 0)) {
|
|
7250
7306
|
var message_1 = 'negative sideSearchM';
|
|
7251
7307
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message_1));
|
|
7252
7308
|
}
|
|
7253
7309
|
// Inline function 'kotlin.require' call
|
|
7254
|
-
if (!(this.
|
|
7310
|
+
if (!(this.p2p() >= 1)) {
|
|
7255
7311
|
var message_2 = 'faceReachM must cover a station';
|
|
7256
7312
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message_2));
|
|
7257
7313
|
}
|
|
7258
7314
|
// Inline function 'kotlin.require' call
|
|
7259
|
-
if (!(this.
|
|
7315
|
+
if (!(this.a2p_1 >= 0.0 && this.b2p_1 > 0.0 && this.c2p_1 > 0.0)) {
|
|
7260
7316
|
var message_3 = 'grades must be positive';
|
|
7261
7317
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message_3));
|
|
7262
7318
|
}
|
|
7263
7319
|
// Inline function 'kotlin.require' call
|
|
7264
|
-
if (!(this.
|
|
7320
|
+
if (!(this.e2p_1 >= 0.0 && this.f2p_1 > 0.0 && this.h2p_1 >= 0.0)) {
|
|
7265
7321
|
var message_4 = 'negative threshold';
|
|
7266
7322
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message_4));
|
|
7267
7323
|
}
|
|
7268
|
-
var containsUpper = this.
|
|
7269
|
-
var containsArg = this.
|
|
7324
|
+
var containsUpper = this.k2p_1;
|
|
7325
|
+
var containsArg = this.j2p_1;
|
|
7270
7326
|
// Inline function 'kotlin.require' call
|
|
7271
7327
|
if (!(0.0 <= containsArg ? containsArg <= containsUpper : false)) {
|
|
7272
7328
|
var message_5 = 'minLengthM must be in 0..maxLengthM';
|
|
7273
7329
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message_5));
|
|
7274
7330
|
}
|
|
7275
|
-
var containsArg_0 = this.
|
|
7331
|
+
var containsArg_0 = this.l2p_1;
|
|
7276
7332
|
// Inline function 'kotlin.require' call
|
|
7277
7333
|
if (!(0.0 <= containsArg_0 ? containsArg_0 <= 1.0 : false)) {
|
|
7278
|
-
var message_6 = 'minStraightness must be in 0..1, got ' + this.
|
|
7334
|
+
var message_6 = 'minStraightness must be in 0..1, got ' + this.l2p_1;
|
|
7279
7335
|
throw IllegalArgumentException_init_$Create$_0(toString_0(message_6));
|
|
7280
7336
|
}
|
|
7281
7337
|
}
|
|
7282
|
-
protoOf(TunnelDetectorOptions).
|
|
7283
|
-
return stations_0(this, this.
|
|
7338
|
+
protoOf(TunnelDetectorOptions).m2p = function () {
|
|
7339
|
+
return stations_0(this, this.y2o_1, 'footWindowM');
|
|
7284
7340
|
};
|
|
7285
|
-
protoOf(TunnelDetectorOptions).
|
|
7286
|
-
return stations_0(this, this.
|
|
7341
|
+
protoOf(TunnelDetectorOptions).n2p = function () {
|
|
7342
|
+
return stations_0(this, this.z2o_1, 'steepWindowM');
|
|
7287
7343
|
};
|
|
7288
|
-
protoOf(TunnelDetectorOptions).
|
|
7289
|
-
return stations_0(this, this.
|
|
7344
|
+
protoOf(TunnelDetectorOptions).o2p = function () {
|
|
7345
|
+
return stations_0(this, this.d2p_1, 'sideSearchM');
|
|
7290
7346
|
};
|
|
7291
|
-
protoOf(TunnelDetectorOptions).
|
|
7292
|
-
return stations_0(this, this.
|
|
7347
|
+
protoOf(TunnelDetectorOptions).p2p = function () {
|
|
7348
|
+
return stations_0(this, this.g2p_1, 'faceReachM');
|
|
7293
7349
|
};
|
|
7294
7350
|
protoOf(TunnelDetectorOptions).toString = function () {
|
|
7295
|
-
return 'TunnelDetectorOptions(stepM=' + this.
|
|
7351
|
+
return 'TunnelDetectorOptions(stepM=' + this.x2o_1 + ', footWindowM=' + this.y2o_1 + ', steepWindowM=' + this.z2o_1 + ', maxRoadGrade=' + this.a2p_1 + ', minPortalGrade=' + this.b2p_1 + ', minSideGrade=' + this.c2p_1 + ', sideSearchM=' + this.d2p_1 + ', maxChordGrade=' + this.e2p_1 + ', minHeightM=' + this.f2p_1 + ', faceReachM=' + this.g2p_1 + ', maxBelowChordM=' + this.h2p_1 + ', minValleyHeightM=' + this.i2p_1 + ', minLengthM=' + this.j2p_1 + ', maxLengthM=' + this.k2p_1 + ', minStraightness=' + this.l2p_1 + ')';
|
|
7296
7352
|
};
|
|
7297
7353
|
protoOf(TunnelDetectorOptions).hashCode = function () {
|
|
7298
|
-
var result = getNumberHashCode(this.
|
|
7299
|
-
result = imul(result, 31) + getNumberHashCode(this.v2o_1) | 0;
|
|
7300
|
-
result = imul(result, 31) + getNumberHashCode(this.w2o_1) | 0;
|
|
7301
|
-
result = imul(result, 31) + getNumberHashCode(this.x2o_1) | 0;
|
|
7354
|
+
var result = getNumberHashCode(this.x2o_1);
|
|
7302
7355
|
result = imul(result, 31) + getNumberHashCode(this.y2o_1) | 0;
|
|
7303
7356
|
result = imul(result, 31) + getNumberHashCode(this.z2o_1) | 0;
|
|
7304
7357
|
result = imul(result, 31) + getNumberHashCode(this.a2p_1) | 0;
|
|
@@ -7310,6 +7363,9 @@
|
|
|
7310
7363
|
result = imul(result, 31) + getNumberHashCode(this.g2p_1) | 0;
|
|
7311
7364
|
result = imul(result, 31) + getNumberHashCode(this.h2p_1) | 0;
|
|
7312
7365
|
result = imul(result, 31) + getNumberHashCode(this.i2p_1) | 0;
|
|
7366
|
+
result = imul(result, 31) + getNumberHashCode(this.j2p_1) | 0;
|
|
7367
|
+
result = imul(result, 31) + getNumberHashCode(this.k2p_1) | 0;
|
|
7368
|
+
result = imul(result, 31) + getNumberHashCode(this.l2p_1) | 0;
|
|
7313
7369
|
return result;
|
|
7314
7370
|
};
|
|
7315
7371
|
protoOf(TunnelDetectorOptions).equals = function (other) {
|
|
@@ -7317,12 +7373,6 @@
|
|
|
7317
7373
|
return true;
|
|
7318
7374
|
if (!(other instanceof TunnelDetectorOptions))
|
|
7319
7375
|
return false;
|
|
7320
|
-
if (!equals(this.u2o_1, other.u2o_1))
|
|
7321
|
-
return false;
|
|
7322
|
-
if (!equals(this.v2o_1, other.v2o_1))
|
|
7323
|
-
return false;
|
|
7324
|
-
if (!equals(this.w2o_1, other.w2o_1))
|
|
7325
|
-
return false;
|
|
7326
7376
|
if (!equals(this.x2o_1, other.x2o_1))
|
|
7327
7377
|
return false;
|
|
7328
7378
|
if (!equals(this.y2o_1, other.y2o_1))
|
|
@@ -7347,6 +7397,12 @@
|
|
|
7347
7397
|
return false;
|
|
7348
7398
|
if (!equals(this.i2p_1, other.i2p_1))
|
|
7349
7399
|
return false;
|
|
7400
|
+
if (!equals(this.j2p_1, other.j2p_1))
|
|
7401
|
+
return false;
|
|
7402
|
+
if (!equals(this.k2p_1, other.k2p_1))
|
|
7403
|
+
return false;
|
|
7404
|
+
if (!equals(this.l2p_1, other.l2p_1))
|
|
7405
|
+
return false;
|
|
7350
7406
|
return true;
|
|
7351
7407
|
};
|
|
7352
7408
|
//region block: init
|