Files
ZYZ/shared/pubUtils/dictionary/DicRougeLayerNodeNumPlan.ts
2023-08-30 11:02:52 +08:00

28 lines
876 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 每层可以随机的点的数量的池子
*/
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<number, DicRougeLayerNodeNumPlan[]>();
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;
}