public void CreateStructre()
        {
            double[] childProbability;
            double[] parentProbability;
            double[] resultProbability;

            //Left
            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 3);
            Net.AddNode(Network.NodeType.Cpt, "p3");
            SetNodeStates("p3");
            Net.SetNodeDefinition("p3", parentProbability);

            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 26);
            Net.AddNode(Network.NodeType.Cpt, "p26");
            SetNodeStates("p26");
            Net.SetNodeDefinition("p26", parentProbability);

            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 38);
            Net.AddNode(Network.NodeType.Cpt, "p38");
            SetNodeStates("p38");
            Net.SetNodeDefinition("p38", parentProbability);

            //Middle
            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 13);
            Net.AddNode(Network.NodeType.Cpt, "p13");
            SetNodeStates("p13");
            Net.SetNodeDefinition("p13", parentProbability);

            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 29);
            Net.AddNode(Network.NodeType.Cpt, "p29");
            SetNodeStates("p29");
            Net.SetNodeDefinition("p29", parentProbability);

            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 41);
            Net.AddNode(Network.NodeType.Cpt, "p41");
            SetNodeStates("p41");
            Net.SetNodeDefinition("p41", parentProbability);

            //Right
            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 15);
            Net.AddNode(Network.NodeType.Cpt, "p15");
            SetNodeStates("p15");
            Net.SetNodeDefinition("p15", parentProbability);

            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 37);
            Net.AddNode(Network.NodeType.Cpt, "p37");
            SetNodeStates("p37");
            Net.SetNodeDefinition("p37", parentProbability);

            parentProbability = Helper.CountProbabilityForParentVertex(Ldata, 42);
            Net.AddNode(Network.NodeType.Cpt, "p42");
            SetNodeStates("p42");
            Net.SetNodeDefinition("p42", parentProbability);

            //Left
            childProbability = Helper.CountProbabilityDistributionForChildVertex(Ldata, 6, SetIndexes(3, 26, 38));
            Net.AddNode(Network.NodeType.Cpt, "c6");

            SetNodeStates("c6");
            Net.AddArc("p3", "c6");
            Net.AddArc("p26", "c6");
            Net.AddArc("p38", "c6");

            Net.SetNodeDefinition("c6", childProbability);

            childProbability = Helper.CountProbabilityDistributionForChildVertex(Ldata, 2, SetIndexes(3, 26, 38));
            Net.AddNode(Network.NodeType.Cpt, "c2");

            Net.AddArc("p3", "c2");
            Net.AddArc("p26", "c2");
            Net.AddArc("p38", "c2");

            SetNodeStates("c2");
            Net.SetNodeDefinition("c2", childProbability);

            //Middle
            childProbability = Helper.CountProbabilityDistributionForChildVertex(Ldata, 20, SetIndexes(13, 29, 41));
            Net.AddNode(Network.NodeType.Cpt, "c20");

            Net.AddArc("p13", "c20");
            Net.AddArc("p29", "c20");
            Net.AddArc("p41", "c20");

            SetNodeStates("c20");
            Net.SetNodeDefinition("c20", childProbability);

            childProbability = Helper.CountProbabilityDistributionForChildVertex(Ldata, 56, SetIndexes(13, 29, 41));
            Net.AddNode(Network.NodeType.Cpt, "c56");

            Net.AddArc("p13", "c56");
            Net.AddArc("p29", "c56");
            Net.AddArc("p41", "c56");

            SetNodeStates("c56");
            Net.SetNodeDefinition("c56", childProbability);

            //Right
            childProbability = Helper.CountProbabilityDistributionForChildVertex(Ldata, 19, SetIndexes(15, 37, 42));
            Net.AddNode(Network.NodeType.Cpt, "c19");

            Net.AddArc("p15", "c19");
            Net.AddArc("p37", "c19");
            Net.AddArc("p42", "c19");

            SetNodeStates("c19");
            Net.SetNodeDefinition("c19", childProbability);

            //Result
            Int32[] indexes = { 6, 2, 20, 56, 19 };
            resultProbability = Helper.CountProbabilityDistributionForResult(Ldata, indexes);
            Net.AddNode(Network.NodeType.Cpt, "result");

            Net.AddArc("c6", "result");
            Net.AddArc("c2", "result");
            Net.AddArc("c20", "result");
            Net.AddArc("c56", "result");
            Net.AddArc("c19", "result");

            SetNodeStateParent("result");
            Net.SetNodeDefinition("result", resultProbability);


            Net.WriteFile("lungcancer.xdsl");
        }