DRAFT: Legendre GF accumulation

Basically an adaptation of code from cthyb_matrix. Not tested yet.