ht's Scheme Interpreter
1.0
a simplified scheme interpreter implementation
|
#include <bigint.hpp>
Public Member Functions | |
BigInt (long long num) | |
BigInt (const std::string &s) | |
BigInt () | |
BigInt & | assign (long long num) |
BigInt & | assign (const std::string &s) |
BigInt & | operator+= (const BigInt &b) |
BigInt & | operator-= (const BigInt &b) |
BigInt & | operator*= (const BigInt &b) |
BigInt & | operator/= (const BigInt &b) |
BigInt & | operator%= (const BigInt &b) |
BigInt | operator+ (const BigInt &b) const |
BigInt | operator- (const BigInt &b) const |
BigInt | operator* (const BigInt &b) const |
BigInt | operator/ (const BigInt &b) const |
BigInt | operator% (const BigInt &b) const |
BigInt | operator- () const |
bool | operator> (const BigInt &b) const |
bool | operator< (const BigInt &b) const |
bool | operator== (const BigInt &b) const |
bool | operator!= (const BigInt &b) const |
bool | operator>= (const BigInt &b) const |
bool | operator<= (const BigInt &b) const |
Private Member Functions | |
bool | isZero () const |
BigInt & | rawPlus (const BigInt &b) |
BigInt & | rawMinus (const BigInt &b) |
std::pair< BigInt &, BigInt > | divandmod (const BigInt &b) |
bool | rawSmaller (const BigInt &b) const |
bool | rawGreater (const BigInt &b) const |
BigInt & | setSign (const bool sign) |
Private Attributes | |
std::vector< int32_t > | d |
size_t | len |
bool | nonNeg |
Friends | |
std::istream & | operator>> (std::istream &i, BigInt &b) |
std::ostream & | operator<< (std::ostream &o, const BigInt &b) |
template<typename CompareFunc > | |
bool | rawCompare (const BigInt &a, const BigInt &b) |
Definition at line 11 of file bigint.hpp.
BigInt::BigInt | ( | long long | num | ) |
Definition at line 20 of file bigint.cpp.
BigInt::BigInt | ( | const std::string & | s | ) |
Definition at line 25 of file bigint.cpp.
BigInt::BigInt | ( | ) |
Definition at line 30 of file bigint.cpp.
BigInt & BigInt::assign | ( | long long | num | ) |
Definition at line 35 of file bigint.cpp.
BigInt & BigInt::assign | ( | const std::string & | s | ) |
Definition at line 56 of file bigint.cpp.
Definition at line 315 of file bigint.cpp.
|
private |
Definition at line 15 of file bigint.cpp.
bool BigInt::operator!= | ( | const BigInt & | b | ) | const |
Definition at line 146 of file bigint.cpp.
Definition at line 370 of file bigint.cpp.
Definition at line 364 of file bigint.cpp.
Definition at line 278 of file bigint.cpp.
Definition at line 303 of file bigint.cpp.
Definition at line 264 of file bigint.cpp.
Definition at line 202 of file bigint.cpp.
Definition at line 271 of file bigint.cpp.
BigInt BigInt::operator- | ( | ) | const |
Definition at line 95 of file bigint.cpp.
Definition at line 235 of file bigint.cpp.
Definition at line 358 of file bigint.cpp.
Definition at line 353 of file bigint.cpp.
bool BigInt::operator< | ( | const BigInt & | b | ) | const |
Definition at line 124 of file bigint.cpp.
bool BigInt::operator<= | ( | const BigInt & | b | ) | const |
Definition at line 156 of file bigint.cpp.
bool BigInt::operator== | ( | const BigInt & | b | ) | const |
Definition at line 138 of file bigint.cpp.
bool BigInt::operator> | ( | const BigInt & | b | ) | const |
Definition at line 133 of file bigint.cpp.
bool BigInt::operator>= | ( | const BigInt & | b | ) | const |
Definition at line 151 of file bigint.cpp.
|
private |
Definition at line 119 of file bigint.cpp.
Definition at line 182 of file bigint.cpp.
Definition at line 161 of file bigint.cpp.
|
private |
Definition at line 114 of file bigint.cpp.
|
private |
Definition at line 309 of file bigint.cpp.
|
friend |
Definition at line 248 of file bigint.cpp.
|
friend |
Definition at line 240 of file bigint.cpp.
Definition at line 104 of file bigint.cpp.
|
private |
Definition at line 14 of file bigint.hpp.
|
private |
Definition at line 15 of file bigint.hpp.
|
private |
Definition at line 16 of file bigint.hpp.