|
@@ -449,6 +449,13 @@ CertainTrust.prototype._internalFusion = function(args, weights, doc) {
|
|
atLeastOne1 = true;
|
|
atLeastOne1 = true;
|
|
i = arrLength;
|
|
i = arrLength;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if(atLeastOne1 && !allOne){
|
|
|
|
+ for (i = 0; i < arrLength; ++i)
|
|
|
|
+ if (args[i].getC() === 1) {
|
|
|
|
+ args[i].setTC(args[i].getT(),0.99999);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
//Calculate T and C
|
|
//Calculate T and C
|
|
|
|
|
|
@@ -469,9 +476,6 @@ CertainTrust.prototype._internalFusion = function(args, weights, doc) {
|
|
resT = numeratorT/denominatorT;
|
|
resT = numeratorT/denominatorT;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (atLeastOne1)
|
|
|
|
- throw "Illegal arguments. Either all C values must equal 1 or none of them. Operation not allowed\n";
|
|
|
|
- else {
|
|
|
|
// 2. Any other combination
|
|
// 2. Any other combination
|
|
if (allWeightsZero) { // save some calculation time
|
|
if (allWeightsZero) { // save some calculation time
|
|
resT = 0;
|
|
resT = 0;
|
|
@@ -498,7 +502,6 @@ CertainTrust.prototype._internalFusion = function(args, weights, doc) {
|
|
// Special case for T
|
|
// Special case for T
|
|
if (allZero)
|
|
if (allZero)
|
|
resT = 0.5;
|
|
resT = 0.5;
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// Calculate F
|
|
// Calculate F
|