public TweetRelation(Tweet n1, Tweet n2)
        {
            if (n1 == n2)
                throw new Exception("Cannot create edge where both tweets are the same.");

            N1 = n1;
            N2 = n2;
            n1.Edges.Add(this);
            n2.Edges.Add(this);
        }
Exemple #2
0
        public bool IsOrHasNeighbor(Tweet n2)
        {
            if (n2 == this)
                return true;

            foreach (TweetRelation e in RemainingEdges)
            {
                if (e.N1 == n2 || e.N2 == n2)
                    return true;
            }
            return false;
        }