---
title: "sandbox"
author:
date: "June, 2018"
output: html_document
---
```{r}
library("pracma")
library("Smisc")
```
#Run these matrices from Yuan2013
#ToDo in the next version
#next build a data structure to run more networks systematically.
#plug in these matrices into matrix A variable above
#then find n_D

```{r fig1A_a}
A_a<-matrix(c(0,1,1,1,1,1,1,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0),nrow=6,ncol=6)
A_a;
eig<-eigen(A_a);
eig;
#functionND(A_a)
```
```{r fig1A_b}
A_b<-matrix(c(1,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,0,0,1,0,0,1,0,0,1,0,0,0,1,1,1,0,0,0,0,1),nrow=6,ncol=6)
A_c<-matrix(c(0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0),nrow=6,ncol=6)
```
#nd_names = c( 'network','network_size','eigen-values','eigen-vectors','nd')
#nd= data.frame(matrix(, nrow=3, ncol=length(nd_names)) #set up a skeleton table
#names(nd) = c( "network","network_size","eigen-values","eigen-vectors","nd")
```{r}
#result<-data.frame(network_name=c("A_a","A_b","A_c"),
# network_size=c(length(A_a[1,]),length(A_b[1,]),length(A_c[1,])),
# driver_nodes=c(functionND(A_a),functionND(A_b),functionND(A_c)));
#result;
```