/** * Coalition * * Represents a governing coalition of multiple political parties * * Research Foundation: * - Laver (2020): Minimal winning coalitions in parliamentary systems * - Martin & Stevenson (2001): Government formation in parliamentary democracies * * @module coalition/Coalition */ import { PoliticalParty } from '../core/PoliticalParty.js'; import { PolicyVector } from '../policy/PolicyVector.js'; /** * Coalition configuration */ export interface CoalitionConfig { /** Member parties */ parties: PoliticalParty[]; /** Formation date (month in simulation) */ formationDate: number; /** Is this coalition currently in government? */ isGoverning?: boolean; } /** * Coalition * * Represents a political coalition with member parties and stability metrics */ export declare class Coalition { readonly parties: PoliticalParty[]; readonly formationDate: number; isGoverning: boolean; /** Cached values for performance */ private _totalSeats; private _policyCentroid; constructor(config: CoalitionConfig); /** * Get total seat share of coalition (0-1) */ getTotalSeats(): number; /** * Get policy centroid of coalition (weighted by seat share) * * This represents the coalition's effective policy position, * weighted by each party's influence (seat share) */ getPolicyCentroid(): PolicyVector; /** * Check if coalition has majority (>50% seats) */ hasMajority(): boolean; /** * Check if coalition is minimal winning * (removing any party would lose majority) * * Research: Minimal winning coalitions are most common (Laver 2020) */ isMinimalWinning(): boolean; /** * Get excess seats beyond majority threshold * Higher values = more stable (buffer against defections) */ getExcessSeats(): number; /** * Get number of parties in coalition */ getSize(): number; /** * Check if coalition contains specific party */ hasParty(partyId: string): boolean; /** * Get party IDs in coalition */ getPartyIds(): string[]; /** * Check if all parties are compatible with each other * (no blacklisted combinations) */ areAllPartiesCompatible(): boolean; /** * String representation */ toString(): string; /** * Clone coalition */ clone(): Coalition; }