✨ feat(稷下学宫): ff931afe4到7421822f6
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user