attestation-to-examiner-distribution
Version:
An API to calculate the precedence diagram method
41 lines (40 loc) • 2.39 kB
TypeScript
import jsgraphs from "js-graph-algorithms";
export default class GraphHelper {
static getJSGraphsFlowNetwork(graphAndVerticeMaps: any): any;
/**
* Returns the maximum flow of the given graph by reducing the tutor capacity until the maximum flow is still reached.
* @param unoptimizedJSON
*/
static getTutorCapacityWhereAllHaveSameMaximum(unoptimizedJSON: any): number;
static getTutorOptimizationWhereAllHaveSameMinimum(unoptimizedJSON: any, maxTutorCapacity: any): number;
static getDictTutorToIndividualDiff(unoptimizedJSON: any, maxTutorCapacity: any, dictTutorToIndividualDiff: any): any;
static getDictTutorDistributionInformation(unoptimizedJSON: any, maxTutorCapacity: any): {};
static getGraphFromGraphRaw(graphRaw: any, nameToVertice: any, verticeToName: any, tutorCapacity: number): any;
static getMinCut(graphAndVerticeMaps: any): jsgraphs.FlowEdge[];
static getMaxFlow(g: any, source: number, sink: number): number;
static getTutorDistributionFromGraphAndVerticeMaps(unoptimizedJSON: any, graphAndVerticeMaps: any): any;
static getTutorDistribution(unoptimizedJSON: any, tutorCapacity: number): any;
static getDictTutorToAmountGroups(unoptimizedJSON: any, dictTutorToIndividualDiff?: any): any;
static removeUnnecessarySwitchesInSameSlots(oldPlan: any, unoptimizedJSON: any): any;
static removeUnnecessarySwitchesInSameSlot(oldPlan: any, newPlan: any, groupsAtTimeAndDay: any, day: any, time: any): any;
static getPlanWithSwitchedTutors(newPlan: any, tutorPermutationArray: any, groupsAtTimeAndDayArray: any): any;
/**
* Return all permutations of the tutorsArray
* input: ["apple", "banana", "kiwi"]
*
* [["apple", "banana", "kiwi"]
* ["apple", "kiwi", "banana"]
* ["kiwi", "banana", "apple"]
* ["kiwi", "apple", "banana"]
* ["banana", "kiwi", "apple"]
* ["banana", "apple", "kiwi"]]
*
* @param tutorsArray
* @returns all permutations of the tutorsArray
*/
static getTutorPermutations(tutorsArray: any): any;
static getTutorsArrayForGroupsAtTimeAndDays(newPlan: any, groupsAtTimeAndDay: any): any;
static countAmountOfSwitchesInPlan(oldPlan: any, newPlan: any, groupsAtTimeAndDay: any): number;
static mergeSingleGroups(unoptimizedJSON: any): any;
static getOptimizedDistribution(unoptimizedJSON: any): any;
}