ShannonTree.Fast
Back to table
/*
Shannon-Tree
ShannonTree.Fast
[BDD tree]=ShannonTree.Fast(LogicFunction F);
F : a logic function
tree : a logic function in the BDD form
Create the tree of the given logic-function with the fast algorithm.
The result very depends on the selection of the first few variables. Hence, sometimes it returns some unexpected terrible result.
*/
//-------------------------------------------------------------------
// examples
f = AndOr()
{
2,4;
1,-3;
-1,2,3;
-1,2,3,4;
-2,-4;
}
g=ShannonTree.Fast(f);
Print(f,g);
//-------------------------------------------------------------------
// result
MatchLogicFunction Analysis IsPositiveUnateFunctionTo IsSelfDualFunction IsUnateFunction binary() ToBinary OneComplement PureBinary TwoComplement ToAndXor ToDiagram ToDualFunction ToTruthTable Dimacs Email Get logicvardef() long Radixes One OrAnd real Realization To2LayerNor SOP To2layerOrAnd HuffmanMealy Balanced Zero