/** * 每层可以随机的点的数量的池子 */ import { readFileAndParse } from '../util' import { FILENAME } from '../../consts' export interface DicRougeLayerNodeNumPlan { readonly id: number; readonly nodeNumPlanId: number; // 随机方案,dicRougeLayer的nodeNumPlan引用 readonly nodeNum: number; // 节点数量 readonly weight: number; // 他的权重 } export const dicRougeLayerNodeNumPlan = new Map(); export function loadRougeLayerNodeNumPlan() { dicRougeLayerNodeNumPlan.clear(); let arr = readFileAndParse(FILENAME.DIC_ROUGE_LAYER_NODE_NUM_PLAN); arr.forEach(o => { if (!dicRougeLayerNodeNumPlan.get(o.nodeNumPlanId)) dicRougeLayerNodeNumPlan.set(o.nodeNumPlanId, []); dicRougeLayerNodeNumPlan.get(o.nodeNumPlanId).push(o); }); arr = undefined; }