Package ptolemy.data

Examples of ptolemy.data.Token.divide()


            for (int i = 1; i < token.length(); i++) {
                sum = sum.add(token.getElement(i));
            }

            output.send(0, sum.divide(new IntToken(token.length())));
        }
    }
}
View Full Code Here


                    sum = sum.add(inputValues[j].multiply(inputValues[j + i]));
                }
            }

            if (biasedValue) {
                _outputs[(i + _numberOfLags) - notSymmetric] = sum
                        .divide(numberOfInputs.getToken());
            } else {
                _outputs[(i + _numberOfLags) - notSymmetric] = sum
                        .divide(new IntToken(_numberOfInputs - i));
            }
View Full Code Here

            if (biasedValue) {
                _outputs[(i + _numberOfLags) - notSymmetric] = sum
                        .divide(numberOfInputs.getToken());
            } else {
                _outputs[(i + _numberOfLags) - notSymmetric] = sum
                        .divide(new IntToken(_numberOfInputs - i));
            }
        }

        // Now fill in the first half, which by symmetry is just
View Full Code Here

                } else {
                    sum = sum.add(inputValues[j].multiply(inputValues[j + i]));
                }
            }
            if (biasedValue) {
                $ASSIGN$_outputs((i + _numberOfLags) - notSymmetric, sum.divide(numberOfInputs.getToken()));
            } else {
                $ASSIGN$_outputs((i + _numberOfLags) - notSymmetric, sum.divide(new IntToken(_numberOfInputs - i)));
            }
        }
        for (int i = _numberOfLags - 1-notSymmetric; i >= 0; i--) {
View Full Code Here

                }
            }
            if (biasedValue) {
                $ASSIGN$_outputs((i + _numberOfLags) - notSymmetric, sum.divide(numberOfInputs.getToken()));
            } else {
                $ASSIGN$_outputs((i + _numberOfLags) - notSymmetric, sum.divide(new IntToken(_numberOfInputs - i)));
            }
        }
        for (int i = _numberOfLags - 1-notSymmetric; i >= 0; i--) {
            if (complex) {
                ComplexToken candidate = (ComplexToken)_outputs[(2 * (_numberOfLags - notSymmetric)) - i];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.