//using System;
using System.Collections.Generic;
//using System.Linq;


//namespace McGuffinsOfflineNetworkWorkshop {
    public class MEdge {
        // Data members that you want serialized into XML need to be public.
        // Data members that should NOT be serialized need to be private or marked with [System.Xml.Serialization.XmlIgnoreAttribute]

        public int indexOfNode1=-1, indexOfNode2=-1; // these are indices of nodes in the network's list of nodes

        public List<MVector2> polyline = new List<MVector2>(); // edge routing in 2D

        public MEdge() {
        }

        public int getIndexOfOtherNode( int nodeIndex ) {
            return (indexOfNode1 == nodeIndex) ? indexOfNode2 : indexOfNode1;
        }

        // Used for Dijkstra's algorithm
        [System.Xml.Serialization.XmlIgnoreAttribute]
        public float dijk_weight;
        [System.Xml.Serialization.XmlIgnoreAttribute]
        public int dijk_state;

    }
//} // namespace

