pub fn fit_transform(
data: &[f32],
n: usize,
d: usize,
config: PaCMAPConfig,
progress: Option<Sender<PaCMAPProgress>>,
cancel: Option<Arc<AtomicBool>>,
) -> Result<Vec<[f32; 2]>, PaCMAPError>Expand description
Embed n × d row-major f32 data into 2 dimensions.
§Arguments
data: flat row-major slice,len = n * dn: number of points; must be ≥ 2 and ≤u32::MAXd: number of dimensions per point; must be ≥ 1config: algorithm configurationprogress: optional channel for per-iteration progress eventscancel: optional cancellation token; checked once per iteration
§Returns
n [f32; 2] pairs aligned with the input rows, or a PaCMAPError.