carl  24.04
Computer ARithmetic Library
carl::FactorizationFactory< uint > Class Reference

This class provides a cached prime factorization for std::size_t. More...

#include <FactorizationFactory.h>

Collaboration diagram for carl::FactorizationFactory< uint >:

Public Member Functions

 FactorizationFactory ()
 
const std::vector< uint > & operator() (uint n)
 Returns the factorization of n. More...
 

Private Attributes

PrimeFactory< uintmPrimes
 
std::vector< std::optional< std::vector< uint > > > mCache
 

Detailed Description

This class provides a cached prime factorization for std::size_t.

Factorizations contain all prime factors, including multiples. Additionally, we define:

  • factorization(0) = {}
  • factorization(1) = {1}

Definition at line 25 of file FactorizationFactory.h.

Constructor & Destructor Documentation

◆ FactorizationFactory()

Member Function Documentation

◆ operator()()

const std::vector<uint>& carl::FactorizationFactory< uint >::operator() ( uint  n)
inline

Returns the factorization of n.

Definition at line 35 of file FactorizationFactory.h.

Field Documentation

◆ mCache

std::vector<std::optional<std::vector<uint> > > carl::FactorizationFactory< uint >::mCache
private

Definition at line 28 of file FactorizationFactory.h.

◆ mPrimes

Definition at line 27 of file FactorizationFactory.h.


The documentation for this class was generated from the following file: