00001 00002 inline void N::set(const N& copy) 00003 { 00004 reserve(copy.size); 00005 if(this_small) 00006 { 00007 limb = copy.limb; 00008 } 00009 else 00010 { 00011 memcpy(data, copy.data, (size + 1) * sizeof(limb_t) ); 00012 } 00013 } 00014 00015 inline void N::set(const limb_t value) 00016 { 00017 reserve(0); 00018 limb = value; 00019 } 00020 00021 inline N& N::operator=(const N& copy) 00022 { 00023 set(copy); 00024 return *this; 00025 } 00026 00027 inline N& N::operator=(const limb_t value) 00028 { 00029 set(value); 00030 return *this; 00031 } 00032 00033 inline void swap(N& a, N& b) 00034 { 00035 std::swap(a.size, b.size); 00036 std::swap(a.data, b.data); 00037 } 00038
Copyright © 2007-2008 Remco Bloemen.
Generated on Tue Jan 22 17:35:31 2008 for symbolism by doxygen 1.5.4