public IDictionary <int, IInputFormatInstance> extractBins(string fileName)
        {
            //fileName = System.Environment.GetEnvironmentVariable ("PATH_GRAPH_FILE");
            this.extractFile(fileName);
            IDictionary <int, IInputFormatInstance> dic = new Dictionary <int, IInputFormatInstance> (this.PARTITION_SIZE);
            bool weighted = this.Weight.Length > 1;

            for (int i = 0; i < this.PARTITION_SIZE; i++)
            {
                dic [i]        = new IInputFormatInstanceImpl();
                dic [i].PARTID = i;
            }
            for (int i = 0; i < this.ESIZE; i++)
            {
                int s     = this.Source [i];
                int t     = this.Target [i];
                int spart = this.PartitionTABLE [s - 1];
                int tpart = this.PartitionTABLE [t - 1];
                if (!weighted)
                {
                    dic [spart].Add(s, t);
                    if (spart != tpart)
                    {
                        dic [tpart].Add(s, t);
                    }
                }
                else
                {
                    float f = this.Weight[i];
                    dic [spart].Add(s, t, f);
                    if (spart != tpart)
                    {
                        dic [tpart].Add(s, t, f);
                    }
                }
            }
            for (int i = 0; i < this.PARTITION_SIZE; i++)
            {
                IInputFormatInstance tmp = dic [i];
                tmp.Trim();
                tmp.PartitionTABLE = this.PartitionTABLE;
                tmp.PARTITION_SIZE = this.PARTITION_SIZE;
            }
            source = new int[1];
            target = new int[1];
            weight = new float[1];
            esize  = 0;
            vsize  = 0;
            partid = -1;
            count  = 0;
            return(dic);
        }
        public object Clone()
        {
            IInputFormatInstanceImpl clone = new IInputFormatInstanceImpl();

            clone.source          = (int[])this.source.Clone();
            clone.target          = (int[])this.target.Clone();
            clone.weight          = (float[])this.weight.Clone();
            clone.partition_table = (int[])this.partition_table.Clone();
            clone.esize           = this.esize;
            clone.vsize           = this.vsize;
            clone.partition_size  = this.partition_size;
            clone.PARTID          = this.PARTID;
            clone.count           = this.count;
            return(clone);
        }