class PureComplex {
constructor(top, ori) {
const dm = top.reduce((a, b) => Math.min(a, b.length), Infinity);
const dM = top.reduce((a, b) => Math.max(a, b.length), 0);
if (dm != dM) throw new Error("Not pure.");
this.dim = dm;
this.top = top;
this.ori = ori || top.map((x) => 1);
if (this.ori.length != this.top.length) throw new Error("Error");
this.vert = {};
}
}