示例#1
0
 /// <summary>
 /// Writes the tree to a binary file
 /// </summary>
 public void WriteToFile(string filename)
 {
     using (var bw = new BinaryWriter(File.Create(filename)))
     {
         headnode.Write(bw);
     }
 }
示例#2
0
        /// <summary>
        /// Write the leaf to a binary file
        /// </summary>
        internal void Write(BinaryWriter bw)
        {
            bw.Write(variable);
            bw.Write(split);
            bw.Write(nSignal);
            bw.Write(nBackground);

            bw.Write(IsFinal);
            if (!IsFinal)
            {
                output1.Write(bw);
                output2.Write(bw);
            }
        }
 internal static void Write(this BinaryWriter bw, Leaf leaf)
 {
     leaf.Write(bw);
 }