public freeGraphTypedResultSet <IObjectWithNameWeightAndType> GetLinked(TNode node)
        {
            freeGraphTypedResultSet <IObjectWithNameWeightAndType> output = new freeGraphTypedResultSet <IObjectWithNameWeightAndType>();
            freeGraphNodeAndLinks res = graph.GetLinks(GetID(node), true);

            foreach (var r in res)
            {
                var n = new freeGraphTypedResultEntry <IObjectWithNameWeightAndType>(r.linkBase);
                n.TNodeA = source[t][r.nodeA.name];
                n.TNodeB = source[t][r.nodeB.name];

                output.Add(n);
            }

            return(output);
        }
        public freeGraphTypedResultSet <TNodeB> GetLinkedNodesOfType <TNodeB>(TNode node) where TNodeB : IObjectWithNameWeightAndType
        {
            freeGraphTypedResultSet <TNodeB> output = new freeGraphTypedResultSet <TNodeB>();
            Type t_B = typeof(TNodeB);
            Type t_A = typeof(TNode);

            freeGraphNodeAndLinks res = graph.GetLinks(GetID(node), true);

            foreach (freeGraphLink r in res)
            {
                var n = new freeGraphTypedResultEntry <TNodeB>(r.linkBase);
                n.TNodeA = (TNodeB)source[t_A][r.nodeA.name];
                n.TNodeB = (TNodeB)source[t_B][r.nodeB.name];

                output.Add(n);
            }

            return(output);
        }