import { DisagreementFunction } from '../election/voting.js';
import { OpinionsArrayManager, OpinionsArray } from './opinionsArray.js';
import '@gouvernathor/python/collections/abc';
import '../utils.js';
import '@gouvernathor/rng';
import '../election/ballots.js';
import '@gouvernathor/python/collections';

type DiffFunction<N extends number> = DisagreementFunction<OpinionsArray<N>, OpinionsArray<N>>;
type OpinParams<N extends number> = Pick<OpinionsArrayManager<N>, "nOpinions" | "opinMax">;
/**
 * Typically used for comparison between instances of the same kind.
 */
declare function symmetricDiff<N extends number>({ nOpinions, opinMax }: OpinParams<N>): DiffFunction<N>;
/**
 * The second operand is the one ponderating the difference.
 * It's intended as the one whose point of view is taken, the "most human" of the two.
 */
declare function ponderedDiff<N extends number>({ nOpinions, opinMax }: OpinParams<N>): DiffFunction<N>;
/**
 * The second operand is again the "most human", the one whose point of view is taken.
 * This simulates agreeing plainly with laws that aren't going far enough,
 * but disagreeing with laws that go too far or that go the wrong way.
 *
 * For each opinion:
 * - if A's opinion a is of the opposite sign of B's opinion b, it "goes the wrong way".
 *   - the difference is Math.abs(a * b)
 * - if A's opinion a is of the same sign as B's opinion b but closer to 0, it "doesn't go far enough".
 *   - the difference is 0
 * - otherwise, it "goes too far".
 *   - the difference is Math.abs(a - b)
 */
declare function fromMaxDiff<N extends number>({ nOpinions, opinMax }: OpinParams<N>): DiffFunction<N>;

export { fromMaxDiff, ponderedDiff, symmetricDiff };
