| 1 |
package ml; |
| 2 |
|
| 3 |
import java.util.Arrays; |
| 4 |
import java.util.Random; |
| 5 |
|
| 6 |
import shared.Tools; |
| 7 |
import shared.Vector; |
| 8 |
|
| 9 |
public class Cell extends Source { |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
public Cell(int id_, int activationType, int lpos_, int layer_, int maxLayer_, |
| 16 |
int prevLayerStart_, int nextLayerStart_, int wid, |
| 17 |
float[] values_, float[] eOverNetArray_) { |
| 18 |
id=id_; |
| 19 |
|
| 20 |
function=Function.getFunction(activationType); |
| 21 |
lpos=lpos_; |
| 22 |
layer=layer_; |
| 23 |
maxLayer=maxLayer_; |
| 24 |
values=values_; |
| 25 |
eOverNetArray=eOverNetArray_; |
| 26 |
assert(values.length==wid); |
| 27 |
prevLayerStart=prevLayerStart_; |
| 28 |
nextLayerStart=nextLayerStart_; |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
assert(lpos>=0 & lpos<wid); |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
public void summateDense(float[] valuesIn) { |
| 44 |
sum=bias; |
| 45 |
assert(valuesIn.length==weights.length) : valuesIn.length+", "+weights.length; |
| 46 |
sum+=Vector.fma(weights, valuesIn); |
| 47 |
final float v=(float)activation(sum); |
| 48 |
setValue(v); |
| 49 |
} |
| 50 |
|
| 51 |
public void summateSparse(float[] valuesIn, int edgeBlockSize) { |
| 52 |
sum=bias; |
| 53 |
sum+=Vector.fma(weights, valuesIn, inputs, edgeBlockSize, Vector.SIMD_FMA_SPARSE); |
| 54 |
final float v=(float)activation(sum); |
| 55 |
setValue(v); |
| 56 |
} |
| 57 |
|
| 58 |
public float calcError(float ideal) { |
| 59 |
float e=ideal-value(); |
| 60 |
return 0.5f*e*e; |
| 61 |
} |
| 62 |
|
| 63 |
synchronized public boolean check() { |
| 64 |
|
| 65 |
|
| 66 |
if(!CellNet.DENSE) { |
| 67 |
assert(layer==maxLayer || outputs!=null) : |
| 68 |
layer+", "+maxLayer+", "+lpos+", "+id(); |
| 69 |
} |
| 70 |
|
| 71 |
if(value!=values[lpos] && (value!=-1 && values[lpos]!=0)) { |
| 72 |
assert(false) : id+", "+layer+", "+lpos+": "+value+", "+values[lpos]+", "+Arrays.toString(values); |
| 73 |
return false; |
| 74 |
} |
| 75 |
if(eOverNet!=eOverNetArray[lpos]) { |
| 76 |
assert(false) : id+", "+layer+", "+lpos+": "+eOverNet+", "+eOverNetArray[lpos]+", "+Arrays.toString(values); |
| 77 |
return false; |
| 78 |
} |
| 79 |
if(layer>0) { |
| 80 |
assert(weights!=null); |
| 81 |
assert(CellNet.DENSE==(inputs==null)); |
| 82 |
|
| 83 |
assert(deltas==null || deltas.length==weights.length); |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
}else { |
| 92 |
|
| 93 |
assert(inputs==null || outputs==null) : id+", "+layer+", "+lpos+": "+deltas+": "+outputs+"\n"+toString()+"\n"; |
| 94 |
} |
| 95 |
return true; |
| 96 |
} |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
void applyUpdates(float invSamples, float alpha) { |
| 103 |
if(layer<1) {return;} |
| 104 |
adjustBias(invSamples, alpha); |
| 105 |
for(int i=0; i<weights.length; i++) { |
| 106 |
final float w=weights[i]; |
| 107 |
|
| 108 |
final float d3=(float)(deltas[i]*invSamples*alpha); |
| 109 |
float w4=w+d3; |
| 110 |
{ |
| 111 |
final float absW4=Math.abs(w4); |
| 112 |
if(absW4>Math.abs(w) && absW4>edgeAmplitudeIncreaseThresh) { |
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
w4=w+edgeAmplitudeIncreaseMult*d3; |
| 117 |
} |
| 118 |
} |
| 119 |
deltas[i]=0; |
| 120 |
|
| 121 |
if((w!=0 || !CellNet.DENSE) && Math.abs(w4)>Float.MIN_NORMAL) {weights[i]=w4;} |
| 122 |
} |
| 123 |
} |
| 124 |
|
| 125 |
public void addError(float e) { |
| 126 |
assert(error>=0); |
| 127 |
error+=e; |
| 128 |
} |
| 129 |
|
| 130 |
public void clearError() { |
| 131 |
error=0; |
| 132 |
} |
| 133 |
|
| 134 |
public void clearTemp() { |
| 135 |
|
| 136 |
biasDelta=0; |
| 137 |
error=0; |
| 138 |
if(layer<1) {return;} |
| 139 |
|
| 140 |
assert(deltas!=null) : id()+", "+layer; |
| 141 |
Arrays.fill(deltas, 0); |
| 142 |
} |
| 143 |
|
| 144 |
public void setBias(float b2, boolean ignoreAssertion) { |
| 145 |
assert(layer>0); |
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
bias=b2; |
| 151 |
} |
| 152 |
|
| 153 |
private void adjustBias(float invSamples, float alpha) { |
| 154 |
assert(layer>0); |
| 155 |
assert(alpha>0) : alpha; |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
float bFromDelta=(float)(bias+biasDelta*invSamples*alpha*biasAlphaMult); |
| 160 |
|
| 161 |
|
| 162 |
setBias(bFromDelta, false); |
| 163 |
|
| 164 |
biasDelta=0; |
| 165 |
} |
| 166 |
|
| 167 |
public void addError(Cell c2) { |
| 168 |
error+=c2.error; |
| 169 |
} |
| 170 |
|
| 171 |
@Override |
| 172 |
public void setValue(float v) { |
| 173 |
assert(layer==0 || v==(float)activation(sum)) : v+", "+activation(sum)+", "+sum; |
| 174 |
|
| 175 |
values[lpos]=value=v; |
| 176 |
} |
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
public final double activation(double x) { |
| 181 |
return function.activate(x); |
| 182 |
} |
| 183 |
|
| 184 |
public final double derivativeXFX(double x, double fx) { |
| 185 |
double d=function.derivativeXFX(x, fx); |
| 186 |
assert(!Double.isNaN(d)) : x+", "+fx+", "+d; |
| 187 |
return d; |
| 188 |
} |
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
void updateEdgesFinalLayerDense(float target, float[] valuesIn, float weightMult) { |
| 194 |
|
| 195 |
final float v=value(); |
| 196 |
eTotalOverOut=calcETotalOverOut(v, target, weightMult); |
| 197 |
outOverNet=(float)derivativeXFX(sum, v); |
| 198 |
|
| 199 |
eOverNet=eOverNetArray[lpos]=eTotalOverOut*outOverNet; |
| 200 |
|
| 201 |
for(int i=0; i<weights.length; i++) { |
| 202 |
|
| 203 |
final float netOverWeight=valuesIn[i]; |
| 204 |
|
| 205 |
final float eTotalOverWeight=eOverNet*netOverWeight; |
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
deltas[i]-=eTotalOverWeight; |
| 212 |
|
| 213 |
|
| 214 |
} |
| 215 |
{ |
| 216 |
assert(layer>0); |
| 217 |
|
| 218 |
biasDelta-=eOverNet; |
| 219 |
} |
| 220 |
|
| 221 |
} |
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
public void updateEdgesHiddenLayerDense(float[] valuesIn, float[] eOverNetNext, float[] weightsOut) { |
| 226 |
|
| 227 |
|
| 228 |
final float v=value(); |
| 229 |
assert(v==values[lpos]) : v+", "+values[lpos]+ |
| 230 |
"\n"+Arrays.toString(values)+ |
| 231 |
"\n"+Arrays.toString(weights)+"\n"; |
| 232 |
outOverNet=(float)derivativeXFX(sum, v); |
| 233 |
|
| 234 |
assert(CellNet.DENSE); |
| 235 |
if(!CellNet.SPECIAL_FMA) { |
| 236 |
eTotalOverOut=Vector.fma(weightsOut, eOverNetNext); |
| 237 |
} |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
eOverNetArray[lpos]=eOverNet=eTotalOverOut*outOverNet; |
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
Vector.addProduct(deltas, valuesIn, -eOverNet); |
| 263 |
|
| 264 |
|
| 265 |
{ |
| 266 |
assert(layer>0) : layer; |
| 267 |
|
| 268 |
biasDelta-=eOverNet; |
| 269 |
} |
| 270 |
|
| 271 |
} |
| 272 |
|
| 273 |
public void updateEdgesHiddenLayerSparse(float[] valuesIn, float[] eOverNetNext, |
| 274 |
float[] weightsOut, int edgeBlockSize) { |
| 275 |
|
| 276 |
|
| 277 |
final float v=value(); |
| 278 |
assert(v==values[lpos]) : v+", "+values[lpos]+ |
| 279 |
"\n"+Arrays.toString(values)+ |
| 280 |
"\n"+Arrays.toString(weights)+"\n"; |
| 281 |
outOverNet=(float)derivativeXFX(sum, v); |
| 282 |
|
| 283 |
assert(!CellNet.DENSE); |
| 284 |
eTotalOverOut=Vector.fma(weightsOut, eOverNetNext, outputs, 1, false); |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
eOverNetArray[lpos]=eOverNet=eTotalOverOut*outOverNet; |
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
Vector.addProduct(deltas, valuesIn, inputs, -eOverNet, edgeBlockSize); |
| 310 |
|
| 311 |
|
| 312 |
{ |
| 313 |
assert(layer>0) : layer; |
| 314 |
|
| 315 |
biasDelta-=eOverNet; |
| 316 |
} |
| 317 |
|
| 318 |
} |
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
public void accumulate(Cell c2) { |
| 323 |
|
| 324 |
|
| 325 |
error+=c2.error; |
| 326 |
|
| 327 |
biasDelta+=c2.biasDelta; |
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
if(layer>0) { |
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
Vector.add(deltas, c2.deltas); |
| 340 |
} |
| 341 |
} |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
public void anneal(float strength, Random randy) { |
| 346 |
if(layer<1){return;} |
| 347 |
if(annealBias) { |
| 348 |
final float abs=Math.abs(bias); |
| 349 |
float xb=strength*(randy.nextFloat()-randy.nextFloat())*biasAnnealMult; |
| 350 |
if(abs<0.2f) {xb=xb*(Tools.max(abs*5, 0.2f));} |
| 351 |
setBias(bias+xb, true); |
| 352 |
} |
| 353 |
for(int i=0; i<weights.length; i++) { |
| 354 |
|
| 355 |
final float w=weights[i]; |
| 356 |
if(w!=0) { |
| 357 |
|
| 358 |
final float abs=Math.abs(w); |
| 359 |
float xe=strength*(randy.nextFloat()-randy.nextFloat()); |
| 360 |
if(abs<lowWeightAnnealCutoff) {xe=xe*(Tools.max(abs*lowWeightAnnealMult, lowWeightAnnealCutoff));} |
| 361 |
if(Math.abs(w+xe)>abs) {xe*=edgeAmplitudeIncreaseMult;} |
| 362 |
final float w2=w+xe; |
| 363 |
|
| 364 |
if(Math.abs(w2)>Float.MIN_NORMAL) {weights[i]=w2;} |
| 365 |
|
| 366 |
} |
| 367 |
} |
| 368 |
} |
| 369 |
|
| 370 |
public void setFrom(Cell c, boolean copyDelta) { |
| 371 |
eTotalOverOut=c.eTotalOverOut; |
| 372 |
outOverNet=c.outOverNet; |
| 373 |
bias=c.bias; |
| 374 |
|
| 375 |
function=c.function; |
| 376 |
value=c.value; |
| 377 |
sum=c.sum; |
| 378 |
error=c.error; |
| 379 |
|
| 380 |
if(weights==null) { |
| 381 |
weights=(c.weights==null ? null : Arrays.copyOf(c.weights, c.weights.length)); |
| 382 |
assert(inputs==null); |
| 383 |
inputs=(c.inputs==null ? null : Arrays.copyOf(c.inputs, c.inputs.length)); |
| 384 |
}else{ |
| 385 |
Vector.copy(weights, c.weights); |
| 386 |
if(!CellNet.DENSE) {Vector.copy(inputs, c.inputs);} |
| 387 |
} |
| 388 |
|
| 389 |
if(outputs==null) { |
| 390 |
outputs=(c.outputs==null ? null : Arrays.copyOf(c.outputs, c.outputs.length)); |
| 391 |
}else{ |
| 392 |
Vector.copy(outputs, c.outputs); |
| 393 |
} |
| 394 |
|
| 395 |
biasDelta=0; |
| 396 |
if(copyDelta) { |
| 397 |
biasDelta=c.biasDelta; |
| 398 |
deltas=(c.deltas==null ? null : Arrays.copyOf(c.deltas, c.deltas.length)); |
| 399 |
}else if(deltas==null){ |
| 400 |
deltas=(weights==null ? null : new float[weights.length]); |
| 401 |
}else { |
| 402 |
Arrays.fill(deltas, 0); |
| 403 |
} |
| 404 |
assert(Tools.equals(inputs, c.inputs)); |
| 405 |
assert(Tools.equals(outputs, c.outputs)); |
| 406 |
assert(Tools.equals(weights, c.weights)); |
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
} |
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
@Override |
| 419 |
public String toString() { |
| 420 |
StringBuilder sb=new StringBuilder(); |
| 421 |
|
| 422 |
sb.append("C"+id()+": v="+String.format("%.4f, b=%.4f, b2=%.4f, e=%.5f", value(), bias, biasDelta, error)); |
| 423 |
if(!terminal()) { |
| 424 |
sb.append(", Edges: {"); |
| 425 |
if(CellNet.DENSE) { |
| 426 |
int prevBase=id-lpos-weights.length; |
| 427 |
for(int i=0; i<weights.length; i++) { |
| 428 |
|
| 429 |
|
| 430 |
sb.append(String.format("C"+(prevBase+i)+"->C"+id+",%.3f,w?=%.4f,d=%.4f; ", -1, weights[i], deltas[i])); |
| 431 |
} |
| 432 |
}else { |
| 433 |
for(int i=0; i<weights.length; i++) { |
| 434 |
final int prev=inputs[i]+prevLayerStart; |
| 435 |
sb.append(String.format("C"+(prev)+"->C"+id+",%.3f,w?=%.4f,d=%.4f; ", -1, weights[i], deltas[i])); |
| 436 |
} |
| 437 |
} |
| 438 |
sb.setLength(sb.length()-2); |
| 439 |
sb.append("}"); |
| 440 |
} |
| 441 |
return sb.toString(); |
| 442 |
} |
| 443 |
|
| 444 |
@Override |
| 445 |
public boolean terminal() { |
| 446 |
|
| 447 |
return layer==0; |
| 448 |
} |
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
public int id() {return id;} |
| 455 |
public float bias() {return bias;} |
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
public static float toWeightedError(double rawError, float v, float target, float weightMult) { |
| 462 |
if(weightMult==0) {return (float)rawError;} |
| 463 |
|
| 464 |
float mult=toErrorMult(v, target, weightMult); |
| 465 |
double incr=toErrorIncr(rawError, v, target); |
| 466 |
assert(incr==0 || incr>=0 == rawError>=0) : incr+", "+rawError; |
| 467 |
return (float)((rawError+incr)*mult); |
| 468 |
} |
| 469 |
|
| 470 |
public static double toErrorIncr(double rawError, float v, float target) { |
| 471 |
double incr=0; |
| 472 |
if(target>cutoffForTraining) { |
| 473 |
if(v<=cutoffForTraining+spread) {incr=fnErrorIncr;} |
| 474 |
}else if(target<cutoffForTraining) { |
| 475 |
if(v>=cutoffForTraining-spread) {incr=fpErrorIncr;} |
| 476 |
} |
| 477 |
double ret=incr*(rawError>=0 ? 1 : -1); |
| 478 |
return ret; |
| 479 |
} |
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
public static float toErrorMult(float v, float target, float multFraction) { |
| 517 |
if(v==target) {return 0;} |
| 518 |
final float mult; |
| 519 |
final boolean positiveError=v>target; |
| 520 |
final boolean positiveGoal=target>cutoffForTraining; |
| 521 |
final boolean negativeGoal=target<cutoffForTraining; |
| 522 |
final boolean excess=(positiveError == positiveGoal); |
| 523 |
|
| 524 |
if(positiveError) { |
| 525 |
if(positiveGoal) { |
| 526 |
assert(excess); |
| 527 |
mult=excessPositiveErrorMult; |
| 528 |
}else if(v>cutoffForTraining-spread){ |
| 529 |
mult=falsePositiveErrorMult; |
| 530 |
}else { |
| 531 |
mult=positiveErrorMult; |
| 532 |
} |
| 533 |
}else{ |
| 534 |
if(negativeGoal) { |
| 535 |
assert(excess); |
| 536 |
mult=excessNegativeErrorMult; |
| 537 |
}else if(v<cutoffForTraining+spread){ |
| 538 |
mult=falseNegativeErrorMult; |
| 539 |
}else { |
| 540 |
mult=negativeErrorMult; |
| 541 |
} |
| 542 |
} |
| 543 |
return ((mult-1)*multFraction)+1; |
| 544 |
} |
| 545 |
|
| 546 |
public static float calcETotalOverOut(float v, float target, float weightMult) { |
| 547 |
float eTotalOverOut=v-target; |
| 548 |
final float ret=toWeightedError(eTotalOverOut, v, target, weightMult); |
| 549 |
return ret; |
| 550 |
} |
| 551 |
|
| 552 |
public static void setLowWeightAnnealCutoff(float c) { |
| 553 |
assert(c>=0 && c<=1); |
| 554 |
lowWeightAnnealCutoff=c; |
| 555 |
lowWeightAnnealMult=Tools.max(1f, 1f/Tools.max(lowWeightAnnealCutoff, 0.0001f)); |
| 556 |
} |
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
public final String typeString() { |
| 561 |
return function.name(); |
| 562 |
} |
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
public void updateEdgesHiddenLayerDense(float alpha, float[] valuesIn, double[] eOverNetNext, float[] weightsOut) { |
| 568 |
throw new RuntimeException("Wrong method, for legacy double[] version in class CellNetDouble"); |
| 569 |
} |
| 570 |
|
| 571 |
|
| 572 |
public Cell(int size, int type, int i, int layerNum, int prevWidth, int width, int nextWidth, float[] lvals, |
| 573 |
double[] eons) { |
| 574 |
throw new RuntimeException("Legacy constructor for CellNetDouble"); |
| 575 |
} |
| 576 |
|
| 577 |
|
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
public float eTotalOverOut; |
| 582 |
public float outOverNet; |
| 583 |
public float eOverNet; |
| 584 |
public double sum=0; |
| 585 |
|
| 586 |
public float bias; |
| 587 |
|
| 588 |
private double biasDelta; |
| 589 |
public double error; |
| 590 |
private final int id; |
| 591 |
final int lpos; |
| 592 |
final int layer; |
| 593 |
final int maxLayer; |
| 594 |
int nextWeight=0; |
| 595 |
|
| 596 |
|
| 597 |
Function function; |
| 598 |
|
| 599 |
|
| 600 |
|
| 601 |
final int prevLayerStart; |
| 602 |
final int nextLayerStart; |
| 603 |
|
| 604 |
|
| 605 |
public int[] inputs; |
| 606 |
public int[] outputs; |
| 607 |
public float[] weights; |
| 608 |
float[] deltas; |
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
private final float[] values; |
| 613 |
public final float[] eOverNetArray; |
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
public static int MAX_TYPE=Function.TANH; |
| 620 |
public static int defaultActivationType=Function.SIG; |
| 621 |
public static int finalLayerType=Function.RSLOG; |
| 622 |
public static float randomTypeRate=0.0f; |
| 623 |
|
| 624 |
static float biasAlphaMult=1f; |
| 625 |
static float biasAnnealMult=0.5f; |
| 626 |
static boolean annealBias=true; |
| 627 |
|
| 628 |
private static float lowWeightAnnealCutoff=0.2f; |
| 629 |
private static float lowWeightAnnealMult=1f/lowWeightAnnealCutoff; |
| 630 |
|
| 631 |
static float cutoffForTraining=0.5f; |
| 632 |
static boolean setCutoffForTraining=false; |
| 633 |
static boolean useMidpoint=false; |
| 634 |
|
| 635 |
static float positiveErrorMult=1.0f; |
| 636 |
static float falsePositiveErrorMult=10.5f; |
| 637 |
|
| 638 |
|
| 639 |
static float excessPositiveErrorMult=0.2f; |
| 640 |
|
| 641 |
static float negativeErrorMult=1.0f; |
| 642 |
static float falseNegativeErrorMult=10.5f; |
| 643 |
static float excessNegativeErrorMult=0.2f; |
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
static float fnErrorIncr=0.01f; |
| 655 |
static float fpErrorIncr=0.00f; |
| 656 |
static float spread=0.050f; |
| 657 |
static float edgeAmplitudeIncreaseMult=0.98f; |
| 658 |
static float edgeAmplitudeIncreaseThresh=0.1f; |
| 659 |
|
| 660 |
} |