This method constructs a chordal network from the digraph of its nodes.
i1 : R = QQ[a,b,c,d,MonomialOrder=>Lex]; |
i2 : DG = digraph {{"a0","b0"}, {"a0","b1"}, {"a1","b2"}, {"b0","c1"}, {"b1","c0"}, {"b2","c0"}, {"c0","d0"}, {"c1","d1"}} o2 = Digraph{a0 => {b0, b1}} a1 => {b2} b0 => {c1} b1 => {c0} b2 => {c0} c0 => {d0} c1 => {d1} d0 => {} d1 => {} o2 : Digraph |
i3 : G = chordalGraph digraph hashTable{a=>{b,c},b=>{c},c=>{d},d=>{}}; |
i4 : tree = elimTree G o4 = ElimTree{a => b } b => c c => d d => null o4 : ElimTree |
i5 : rnk = hashTable{"a0"=>a, "a1"=>a, "b0"=>b, "b1"=>b, "b2"=>b, "c0"=>c, "d0"=>d, "c1"=>c, "d1"=>d}; |
i6 : eqs = hashTable{"a0" => ({a},{}), "a1" => ({},{}), "b0" => ({b},{}), "b1" => ({},{}), "b2" => ({b},{}), "c0" => ({c},{}), "c1" => ({},{}), "d0" => ({},{}), "d1" => ({d},{}) }; |
i7 : chordalNet(eqs,rnk,tree,DG) o7 = ChordalNet{ d => { , d} } b => {b, , b} a => {a, } c => { , c} o7 : ChordalNet |