public void Run()
        {
            //1.Loop through the levels and allocate till the last Term Level
            int LastLevelinTermLevels = Graph.NumOfTermLevels - 1;

            for (int i = 0; i < LastLevelinTermLevels; i++)
            {
                ParentTermLevelState    = graphState.GetTermLevelState(i);
                ChildrenTermLevelState  = graphState.GetTermLevelState(i + 1);
                ChildrenLevelAriteState = graphState.GetARITELevelState(i + 1);
                ParentLevelAggInfo      = Graph.GetNodeAggInfo(i);
                ChildrenLevelAggInfo    = Graph.GetNodeAggInfo(i + 1);
                ChildrenLevelAriteInfo  = Graph.GetAtomicRITEInfo(i + 1);

                AllocateToOneTermLevel();
            }

            //2.Allocate to the lowest level (All Atomic Rites)
            ParentTermLevelState    = graphState.GetTermLevelState(LastLevelinTermLevels);
            ChildrenLevelAriteState = graphState.GetARITELevelState(LastLevelinTermLevels + 1);
            ChildrenLevelAriteInfo  = Graph.GetAtomicRITEInfo(LastLevelinTermLevels + 1);

            AllocateToLowestLevel();
        }
        } //DoLowestLevel

        public void DoTermLevels(float[] FactorVector, int level) //only having AtomicRites
        {
            AtomicRITELevelInfo aRiteInfor = graph.GetAtomicRITEInfo(level).GetaRiteInfo();
            SimpleLevelInfo     nodeInfo   = graph.GetNodeAggInfo(level).GetSimpleLevelInfo();

            //Get Rites Factors
            int NumOfaRites = aRiteInfor.Size;

            int[]   aRiteFactorsIndex = aRiteInfor.FactorsIndex;
            float[] aRiteFactors      = graphstate.GetARITELevelState(level).GetFactors();
            for (int i = 0; i < NumOfaRites; i++)
            {
                int uniqueIndex = aRiteFactorsIndex[i];
                if (uniqueIndex == -1)
                {
                    aRiteFactors[i] = 1;
                }
                else
                {
                    aRiteFactors[i] = FactorVector[uniqueIndex];
                }
            }

            //Get Node Factors
            int NumOfNodes = nodeInfo.Size;

            int[]   nodeFactorsIndex = nodeInfo.FactorsIndex;
            float[] nodeFactors      = graphstate.GetTermLevelState(level).GetFactors();
            for (int i = 0; i < NumOfNodes; i++)
            {
                int uniqueIndex = nodeFactorsIndex[i];
                if (uniqueIndex == -1)
                {
                    nodeFactors[i] = 1;
                }
                else
                {
                    nodeFactors[i] = FactorVector[uniqueIndex];
                }
            }
        }  //DoTermLevels