Esempio n. 1
0
int FElem::getBit(unsigned int i, const FieldType& fieldType) {
    promoteToFieldType(fieldType);
    if (this->fieldType() == fieldType) {
        return elem_->getBit(i);
    } else {
        GADGETLIB_FATAL("Attempted to extract bits from incompatible field type.");
    }
}
Esempio n. 2
0
FElem& FElem::operator+=(const FElem& other) {
    promoteToFieldType(other.fieldType());
    *elem_ += *other.elem_;
    return *this;
}
Esempio n. 3
0
FElem FElem::inverse(const FieldType& fieldType) {
    promoteToFieldType(fieldType);
    return FElem(*(elem_->inverse()));
}
Esempio n. 4
0
int FElem::getBit(unsigned int i, const FieldType& fieldType) {
    promoteToFieldType(fieldType);
    if (this->fieldType() == fieldType) {
        return elem_->getBit(i);
    }
}