public static CGEdgeData CGEdgeDataConvert(IGWEdge <CGNodeData, CGEdgeData, CGGraphData> edge) { var newData = new CGEdgeData(); newData.Weight = edge.Data.Weight; return(newData); }
public static ICRFEdgeData IGWEdgeDataConvert(IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge) { var newData = new CRFEdgeData(); newData.Scores = edge.Data.Scores; return(newData); }
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); }
public static IGWNode Neighbour(this IGWNode node, IGWEdge edge) { if (edge.Head.GraphId == node.GraphId) { return(edge.Foot); } return(edge.Head); }
public static ICRFEdgeData convertEdgeData(IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> arg) { // scores übernehmen var newData = new CRFEdgeData(); newData.Scores = arg.Data.Scores; return(newData); }
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); }
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); } }
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]); } }
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); }
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]); }
public override double Score(IGWEdge <ICRFNodeData, ICRFEdgeData, ICRFGraphData> edge, int labelhead, int labelfoot) { return(0.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]); }
public abstract double Score(IGWEdge <NodeData, EdgeData, GraphData> edge, int labelhead, int labelfoot);
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); }