VectorFactory : KonaVector generator

class kona.linalg.memory.VectorFactory(memory, vec_type=None)[source]

Bases: object

A factory object used for generating Kona’s abstracted vector classes.

This object also tallies up how many vectors of which kind needs to be allocated, based on the memory requirements of each optimization function.

  • num_vecs (int) – Number of vectors requested from this factory.
  • _memory (KonaMemory) – All-knowing Kona memory manager.
  • _vec_type (DesignVector or StateVector or DualVector) – Kona abstracted vector type associated with this factory

Generate one abstract KonaVector of this vector factory’s defined type.

Returns:Abstracted vector type linked to user generated memory.
Return type:KonaVector

Put in a request for the factory’s vector type, to be used later.

Parameters:count (int) – Number of vectors requested.