Beispiel #1
0
Indicator Indicator::operator()(const Indicator& ind) {
    if (!m_imp)
        return Indicator();

    if (!ind.getImp())
        return Indicator(m_imp);
    
    IndicatorImpPtr p = m_imp->clone();
    p->add(IndicatorImp::OP, IndicatorImpPtr(), ind.getImp());
    return p->calculate();
}
Beispiel #2
0
IndicatorImpPtr Weave::operator()(const Indicator& ind) {
    Weave* p = new Weave();
    p->m_discard = m_discard;
    p->m_result_num = m_result_num;

    size_t self_size = size();
    if (m_result_num != 0) {
        p->_readyBuffer(self_size, m_result_num);
        if (self_size != 0) {
            for (size_t i = 0; i < m_result_num; ++i) {
                for (size_t j = m_discard; j < self_size; ++j) {
                    p->_set(get(j,i), j, i);
                }
            }
        }
    }

    p->_calculate(ind);
    return IndicatorImpPtr(p);
}
Beispiel #3
0
Indicator HKU_API DIFF() {
    return Indicator(IndicatorImpPtr(new Diff()));
}