Description Usage Arguments Value Examples
A helper function for replacing the names of new prime implicants (pis) and old prime implicants
1 | replaceName(newnames, oldnames, allnodes)
|
newnames |
A string representing new names of pis |
oldnames |
A string representing old names of pis |
allnodes |
The number of nodes in the Boolean network |
the correct names of pis
1 2 3 4 5 6 7 8 9 10 11 12 13 | ##old names
pis<-list(3,c(2,4),13)
oldnames<-sapply(pis,function(x){paste0(sort(x),collapse = "&")},simplify="array")
print(oldnames)
##new names "1&3" is expected as a combined string made up by "3&13", and assuming 10 nodes in total, then
newnames<-c("1&3")
print(newnames)#'
replaceName(newnames,oldnames,10)
newnames<-c("2&4")
##expect to be "2&4&13"
replaceName(newnames,oldnames,10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.