carl  24.04
Computer ARithmetic Library
DivisionLookupResult.h
Go to the documentation of this file.
1 /**
2  * @file DivisionLookupResult.h
3  * @ingroup gb
4  * @author Sebastian Junges
5  *
6  */
7 
8 #pragma once
9 
10 namespace carl
11 {
12 /**
13  * The result of
14  *
15  * Notice that the DivisionLookupResult does not take ownership of the elements,
16  * i.e. during destruction, nothing happens. Furthermore, if the original divisor element is erased,
17  * the divisor becomes invalid. Instances of DivisionLookupResults are therefore merely suitable for passing information
18  * to be directly processed.
19  */
20 template<typename Polynomial>
22 {
24  mDivisor(nullptr), mFactor()
25  {
26 
27  }
28 
31  {
32 
33 
34  }
35 
37  {
38  // intentionally left empty
39  }
40 
41  DivisionLookupResult(const Polynomial* divisor, const Term<typename Polynomial::CoeffType>& factor) :
42  mDivisor(divisor), mFactor(factor)
43  {
44 
45  }
46 
47  bool success()
48  {
49  return mDivisor != nullptr;
50  }
51 
52 
53  const Polynomial* const mDivisor;
55 };
56 
57 }
carl is the main namespace for the library.
Term< typename Polynomial::CoeffType > mFactor
DivisionLookupResult(const Polynomial *divisor, const Term< typename Polynomial::CoeffType > &factor)
const Polynomial *const mDivisor
DivisionLookupResult(const DivisionLookupResult &d)