6 #ifndef _LOSC_INCLUDE_C_LOSC_LOCALIZATION_H_ 7 #define _LOSC_INCLUDE_C_LOSC_LOCALIZATION_H_ 20 typedef struct _LocalizerBase _LocalizerBase;
30 _LocalizerBase *_p_base;
121 typedef struct _LoscLocalizerV2 _LoscLocalizerV2;
135 _LoscLocalizerV2 *_p_v2;
164 const losc_matrix *C_lo_basis,
const losc_matrix *H_ao,
165 const losc_matrix *D_ao[3]);
172 #define losc_localizer_v2_free(ptr) _losc_localizer_v2_free(&(ptr)) struct LoscLocalizerBase LoscLocalizerBase
The C interface for LOSC localizer base.
The C interface for LOSC localizer base.
Definition: localization.h:29
The C interface for LOSC localizer version 2.
Definition: localization.h:130
void(* set_max_iter)(const LoscLocalizerBase *self, size_t max_iter)
Set the maximum iteration number for localization.
Definition: localization.h:44
struct LoscLocalizerV2 LoscLocalizerV2
The C interface for LOSC localizer version 2.
void(* set_convergence)(const LoscLocalizerBase *self, double tol)
Set the convergence of localization.
Definition: localization.h:56
The C interface of matrix used in LOSC.
void(* set_random_permutation)(const LoscLocalizerBase *self, bool flag)
Set flag for doing random permutation or not for Jacobi-Sweep algorithm.
Definition: localization.h:68
LoscLocalizerBase * p_base
A pointer to a LoscLocalizerBase variable.
Definition: localization.h:145
void(* lo_U)(const LoscLocalizerBase *self, losc_matrix *L, losc_matrix *U)
Calculate the LOs and the unitary.
Definition: localization.h:96
LoscLocalizerV2 * losc_localizer_v2_create(const losc_matrix *C_lo_basis, const losc_matrix *H_ao, const losc_matrix *D_ao[3])
Constructor of LoscLoscLocalizerV2.