Constructor
new QuadRingElement(ring, a, b)
- Source:
Constructor.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
ring |
QuadRing | the underlying quadratic ring |
|
a |
number |
0
|
an integer |
b |
number |
0
|
an integer |
Classes
Members
ring :QuadRing
- Source:
The underlying quadratic ring
Type:
Methods
add(elt) → {QuadRingElement}
- Source:
Addition
Parameters:
Name | Type | Description |
---|---|---|
elt |
QuadRingElement |
Returns:
the current element
- Type
- QuadRingElement
addProduct() → {QuadRingElement}
Add the product of the given element to the current elements
Returns:
the current element
- Type
- QuadRingElement
clone() → {QuadRingElement}
Return a copy of the current element
Returns:
- Type
- QuadRingElement
copy(elt) → {QuadRingElement}
Set the current element to the given one
Parameters:
Name | Type | Description |
---|---|---|
elt |
QuadRingElement |
Returns:
the current element
- Type
- QuadRingElement
equals(elt) → {boolean}
Check if the two element are equal
Parameters:
Name | Type | Description |
---|---|---|
elt |
QuadRingElement |
Returns:
- Type
- boolean
isZero() → {boolean}
Test if the element is zero.
Returns:
- Type
- boolean
multiply(elt) → {QuadRingElement}
- Source:
Multiplication
Parameters:
Name | Type | Description |
---|---|---|
elt |
QuadRingElement |
Returns:
the current element
- Type
- QuadRingElement
negate() → {QuadRingElement}
- Source:
Replace the element by its opposite
Returns:
the current element
- Type
- QuadRingElement
product() → {QuadRingElement}
- Source:
Set the current element of the product of the given arguments
Returns:
the current element
- Type
- QuadRingElement
reduce() → {QuadRingElement}
- Source:
Make the that gcd(a,b,c) = 1
Returns:
the current element
- Type
- QuadRingElement
sub(elt) → {QuadRingElement}
- Source:
Subtraction
Parameters:
Name | Type | Description |
---|---|---|
elt |
QuadRingElement |
Returns:
the current element
- Type
- QuadRingElement
subProduct() → {QuadRingElement}
Subtract the product of the given element to the current elements
Returns:
the current element
- Type
- QuadRingElement
sum() → {QuadRingElement}
- Source:
Set the current element to the sum of the given arguments
Returns:
the current element
- Type
- QuadRingElement
toNumber()
Convert the element to a number