示例#1
0
        //private int _targetScore;
        //private readonly int[] _maxAchievableScore;

        public void ComputeGeneratingFunction()//int targetScore = 0)
        {
            //_targetScore = targetScore;
            var gfTable = new ScoreDistribution[_graph.GetNumNodes()];
            // Source
            var sourceDist = new ScoreDistribution(0, 1);
            sourceDist.SetEValue(0, 1);
            gfTable[0] = sourceDist;

            // All the other nodes
            for (var nodeIndex = 1; nodeIndex < _graph.GetNumNodes(); nodeIndex++)
            {
                gfTable[nodeIndex] = GetScoreDistribution(nodeIndex, gfTable);
            }

            // Sink
            // TODO: adjusting the distribution depending on neighboring amino acid (e.g. R.PEPTIDEK. vs A.PEPTIDEK)
            _scoreDistribution = gfTable[gfTable.Length - 1];
        }
示例#2
0
        //private int _targetScore;
        //private readonly int[] _maxAchievableScore;

        public void ComputeGeneratingFunction()//int targetScore = 0)
        {
            //_targetScore = targetScore;
            var gfTable = new ScoreDistribution[_graph.GetNumNodes()];
            // Source
            var sourceDist = new ScoreDistribution(0, 1);

            sourceDist.SetEValue(0, 1);
            gfTable[0] = sourceDist;

            // All the other nodes
            for (var nodeIndex = 1; nodeIndex < _graph.GetNumNodes(); nodeIndex++)
            {
                gfTable[nodeIndex] = GetScoreDistribution(nodeIndex, gfTable);
            }

            // Sink
            // TODO: adjusting the distribution depending on neighboring amino acid (e.g. R.PEPTIDEK. vs A.PEPTIDEK)
            _scoreDistribution = gfTable[gfTable.Length - 1];
        }