Esempio n. 1
0
        public static CGEdgeData CGEdgeDataConvert(IGWEdge <CGNodeData, CGEdgeData, CGGraphData> edge)
        {
            var newData = new CGEdgeData();

            newData.Weight = edge.Data.Weight;
            return(newData);
        }
Esempio n. 2
0
        public static ICRFEdgeData IGWEdgeDataConvert(IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge)
        {
            var newData = new CRFEdgeData();

            newData.Scores = edge.Data.Scores;
            return(newData);
        }
Esempio n. 3
0
        public static SGLEdgeData SGLEdgeDataConvert(IGWEdge <SGLNodeData, SGLEdgeData, SGLGraphData> edge)
        {
            var newData = new SGLEdgeData();

            newData.Scores = edge.Data.Scores;
            newData.Type   = edge.Data.Type;
            return(newData);
        }
Esempio n. 4
0
 public static IGWNode Neighbour(this IGWNode node, IGWEdge edge)
 {
     if (edge.Head.GraphId == node.GraphId)
     {
         return(edge.Foot);
     }
     return(edge.Head);
 }
Esempio n. 5
0
        public static ICRFEdgeData convertEdgeData(IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> arg)
        {
            // scores übernehmen
            var newData = new CRFEdgeData();

            newData.Scores = arg.Data.Scores;

            return(newData);
        }
Esempio n. 6
0
 public override double Score(IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge, int labelHead, int labelFoot)
 {
     if (labelHead == LabelHead && labelFoot == LabelFoot)
     {
         if (edge.Data.DiffZellnerScore > LowerBoundary && edge.Data.DiffZellnerScore <= UpperBoundary)
         {
             return(1.0);
         }
     }
     return(0.0);
 }
Esempio n. 7
0
 public static double Score(this IGWEdge <ICRFNodeDataBinary, ICRFEdgeDataBinary, ICRFGraphData> edge, bool state1, bool state2)
 {
     if (state1)
     {
         return(state2 ? edge.Data.ScoreTT : edge.Data.ScoreTF);
     }
     else
     {
         return(state2 ? edge.Data.ScoreFT : edge.Data.ScoreFF);
     }
 }
Esempio n. 8
0
 public static double Score(this IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge, int node1, int label1, int node2, int label2)
 {
     if (edge.Head.GraphId.Equals(node1))
     {
         return(edge.Data.Scores[label1, label2]);
     }
     else
     {
         return(edge.Data.Scores[label2, label1]);
     }
 }
Esempio n. 9
0
 public override double Score(IGWEdge <RASACRFNodeData, RASACRFEdgeData, ProteinCRFGraphData> edge, int labelHead, int labelFoot)
 {
     if ((labelHead == LabelHead && labelFoot == LabelFoot) ||
         (labelHead == LabelFoot && labelFoot == LabelHead))
     {
         if (edge.Data.Diff > LowerBoundary && edge.Data.Diff <= UpperBoundary)
         {
             return(1.0);
         }
     }
     return(0.0);
 }
Esempio n. 10
0
        public static double TempScore(this IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge)
        {
            var tempAssignHead = edge.Head.Data.TempAssign;

            if (tempAssignHead < 0)
            {
                return(0.0);
            }
            var tempAssignFoot = edge.Foot.Data.TempAssign;

            if (tempAssignFoot < 0)
            {
                return(0.0);
            }
            return(edge.Data.Scores[tempAssignHead, tempAssignFoot]);
        }
Esempio n. 11
0
 public override double Score(IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge, int labelhead, int labelfoot)
 {
     return(0.0);
 }
Esempio n. 12
0
 //public double Score(AgO<int, int> state)
 //{
 //    return Scores[state.Data1, state.Data2];
 //}
 public static double Score(this IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge, int state1, int state2)
 {
     return(edge.Data.Scores[state1, state2]);
 }
Esempio n. 13
0
 public abstract double Score(IGWEdge <NodeData, EdgeData, GraphData> edge, int labelhead, int labelfoot);
Esempio n. 14
0
 public static IGWNode <NodeData, EdgeData, GraphData> Neighbour <NodeData, EdgeData, GraphData>(this IGWNode <NodeData, EdgeData, GraphData> node, IGWEdge <NodeData, EdgeData, GraphData> edge)
 {
     if (edge.Head.GraphId == node.GraphId)
     {
         return(edge.Foot);
     }
     return(edge.Head);
 }