trevr: A generalNlog2Nradiative transfer algorithm