public LowestCoverLevel(int _numOfResidule, int _numOfArites, int[] _residuleSubAggPartitions, int[] _ariteAggPartitions, int[] _guLossindices, int[] _recoverableLevelIndex, int[] _recoverableIndices, int[] _ariteGULossIndicies, int[] _leafCoveraRiteFactorsIndex, int[] _leafCoverResidualFactorsIndex) { levelsize = _numOfArites + _numOfResidule; lowestCoverLevelInfo = new LowestCoverLevelInfo(_numOfArites, _numOfResidule, _residuleSubAggPartitions, _ariteAggPartitions, _guLossindices, _recoverableLevelIndex, _recoverableIndices, _ariteGULossIndicies, _leafCoveraRiteFactorsIndex, _leafCoverResidualFactorsIndex); }
} //DoTermLevels public void DoLowestCoverLevel(float[] FactorVector) { int level = graph.LowestCoverLevel; LowestCoverLevelInfo lowestCoverLevelInfo = graph.GetLowestCoverLevelInfo(); int[] aRiteFactorsIndex = lowestCoverLevelInfo.LeafCoveraRiteFactorsIndex; int[] residulaRiteFactorsIndex = lowestCoverLevelInfo.LeafCoverResidualFactorsIndex; float[] aRiteFactors = graphstate.GetLowestCoverLevelAriteState().GetFactors(); float[] residualFactors = graphstate.GetLowestCoverLevelResiduleState().GetFactors(); int aRiteNum = aRiteFactorsIndex.Count(); int rRiteNum = residulaRiteFactorsIndex.Count(); for (int i = 0; i < aRiteNum; i++) { int uniqueIndex = aRiteFactorsIndex[i]; if (uniqueIndex == -1) { aRiteFactors[i] = 1; } else { aRiteFactors[i] = FactorVector[uniqueIndex]; } } for (int i = 0; i < rRiteNum; i++) { int uniqueIndex = residulaRiteFactorsIndex[i]; if (uniqueIndex == -1) { residualFactors[i] = 1; } else { residualFactors[i] = FactorVector[uniqueIndex]; } } }
public LowestCoverLevel(LowestCoverLevelInfo _lowestCoverLevelInfo) { lowestCoverLevelInfo = _lowestCoverLevelInfo; levelsize = _lowestCoverLevelInfo.NumOfArites + _lowestCoverLevelInfo.NumOfResidules; }