Exemple #1
0
        private static WeightMatrix LinkNodes(GraphMap <FeatureVector, WeightMatrix> .ILinkable self, GraphMap <FeatureVector, WeightMatrix> .ILinkable node)
        {
            if (self.Data.sourcenames.Contains(node.Data.name))
            {
                MessageBox.Show("Cycles not supported yet");
                return(null);
            }

            WeightMatrix wm = new WeightMatrix(self.Data.size + 1, node.Data.size);

            wm.linkAccess = self.LinkTo(node, wm);
            wm.linkAccess.AddAction("See Matrix", x =>
            {
                var fm = new ViewMatrix(x.weights);
                fm.Show();
            });
            wm.linkAccess.Name = wm.weights.ColumnCount + "x" + wm.weights.RowCount;

            foreach (var sourcename in self.Data.sourcenames)
            {
                node.Data.sourcenames.Add(sourcename);
            }

            // add new
            UpdateLinks(self);
            return(wm);
        }
Exemple #2
0
        private static WeightMatrix LinkNodes(GraphMap<FeatureVector, WeightMatrix>.ILinkable self, GraphMap<FeatureVector, WeightMatrix>.ILinkable node)
        {
            if (self.Data.sourcenames.Contains(node.Data.name))
            {
                MessageBox.Show("Cycles not supported yet");
                return null;
            }

            WeightMatrix wm = new WeightMatrix(self.Data.size + 1, node.Data.size);
            wm.linkAccess = self.LinkTo(node, wm);
            wm.linkAccess.AddAction("See Matrix", x =>
            {
                var fm = new ViewMatrix(x.weights);
                fm.Show();
            });
            wm.linkAccess.Name = wm.weights.ColumnCount + "x" + wm.weights.RowCount;

            foreach (var sourcename in self.Data.sourcenames)
            {
                node.Data.sourcenames.Add(sourcename);
            }

            // add new
            UpdateLinks(self);
            return wm;
        }