feat(稷下学宫): ff931afe4到7421822f6

This commit is contained in:
luying
2023-08-30 11:02:52 +08:00
parent 59a334d673
commit 05cbe318e9
102 changed files with 147876 additions and 715 deletions
@@ -0,0 +1,28 @@
/**
* 每层可以随机的点的数量的池子
*/
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;
}