Changeset 310 for trunk


Ignore:
Timestamp:
04/15/10 14:14:11 (14 years ago)
Author:
bernard
Message:

Fixed bug of repeated axis (was just an error in the read2D() function and not in the main functions setOuter(), setMiddle() or setInner()). Use of the ENFORCE macro to stop the generation in case of error. New error messages to make them more clear for the user. New indentation in the hidden file to make the order statement more compact (no extra lines and tabulations replaced by just two spaces). Tests 3D from 3D_EX2.d to 3D_EX21.d passed. Tests 2D from 2D_EX1.d to 2D_EX8.d passed

Location:
trunk/yao/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/yao/src/3D_EX1.d

    r183 r310  
    2727ctin M4 1 from M3 2 i j k t 
    2828 
    29 order modinspace Soce 
    30   order YB1  
    31 M1 M2 
    32 forder 
    33 forder 
    34  
    35  
    36 order spaceintraj Toce 
    37   Soce 
    38 forder 
    3929 
    4030 
  • trunk/yao/src/YAOObjects/Order.cpp

    r293 r310  
    13291329 
    13301330 
    1331  
    1332  
    1333  
    13341331// ------------------------------------ DEBUT AJOUT CB - GENERATION AUTOMATIQUE DE L'ORDER ------------------------------------------- 
    13351332 
     
    13371334void Order::automaticOrderGenerator(string projectName, Table<Order>& theOrderTable, Table<Modul>& myModulTable, Table<Connection>& myConnectionTable, Table<Space>& mySpaceTable) { 
    13381335 
    1339         vector<cfcStruct> outerComp; 
    1340  
    1341         middleCompType middleComp; 
    1342  
    1343         innerCompType innerComp; 
    1344  
    1345         myGraphType myGraph; 
    1346  
    1347         // As the orderTable should be empty (because the generator is called), this clearing is just relevant in the testing phase  
    1348         // ------------------------------------------------------------------------------------------------------------------------  
    1349   
    1350         theOrderTable.clear();  
    1351  
    1352         // Add a dot to the project name to hide the file 
    1353         // ----------------------------------------------- 
    1354  
    1355         theProject = "." + projectName; 
    1356  
    1357         // Create a output file stream object 
    1358         // ---------------------------------- 
    1359          
    1360         ofstream hiddenFile; 
    1361          
    1362         // Open and close the hidden file without append flag : delete the former hidden file if the project already have one (it should exist some more dedicated functions) 
    1363         // ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
    1364  
    1365         hiddenFile.open(theProject.c_str()); 
    1366  
    1367         hiddenFile.close();  
    1368  
    1369         /* 
     1336        vector<cfcStruct> outerComp; 
     1337 
     1338        middleCompType middleComp; 
     1339 
     1340        innerCompType innerComp; 
     1341 
     1342        myGraphType myGraph; 
     1343 
     1344        // As the orderTable should be empty (because the generator is called), this clearing is just relevant in the testing phase  
     1345        // ------------------------------------------------------------------------------------------------------------------------  
     1346 
     1347        theOrderTable.clear(); 
     1348 
     1349        // Add a dot to the project name to hide the file 
     1350        // ----------------------------------------------- 
     1351 
     1352        theProject = "." + projectName; 
     1353 
     1354        // Create a output file stream object 
     1355        // ---------------------------------- 
     1356 
     1357        ofstream hiddenFile; 
     1358 
     1359        // Open and close the hidden file without append flag : delete the former hidden file if the project already have one (it should exist some more dedicated functions) 
     1360        // ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
     1361 
     1362        hiddenFile.open(theProject.c_str()); 
     1363 
     1364        hiddenFile.close(); 
     1365 
     1366        /* 
    13701367         * Get informations on the trajectories then map all the spaces with the trajectory in which they are included.  
    13711368         * As this information is not provided by the space (the space object have no information about the trajectories), 
     
    14211418        } 
    14221419 
    1423          
     1420 
    14241421        /* 
    14251422         * Set up a graph that will contain one vertex by space and one edge by pair of moduls connected from different spaces.  
     
    15421539        } 
    15431540 
    1544         // Sort the trajectories accordingly to their higher space order Id  
    1545         // ---------------------------------------------------------------- 
    1546  
    1547         sort(trajOrder.begin(), trajOrder.end());  
    1548  
    1549  
    1550         /* 
    1551         * Launch the modinspace generating space by space in the order that have been defined in the spaceintraj generating step just below 
    1552         */ 
    1553  
    1554         //  For all the sorted trajectories 
     1541        // Sort the trajectories accordingly to their higher space order Id  
     1542        // ---------------------------------------------------------------- 
     1543 
     1544        sort(trajOrder.begin(), trajOrder.end()); 
     1545 
     1546 
     1547        /* 
     1548        * Launch the modinspace generating space by space in the order that have been defined in the spaceintraj generating step just below 
     1549        */ 
     1550 
     1551        //  For all the sorted trajectories 
    15551552        // -------------------------------- 
    15561553 
     
    15751572                                // ------------------------------------------------------ 
    15761573 
    1577                                 string spaceName = trajMap.find(spacesList[noTopo]) -> first; 
    1578  
    1579                                 // Show the modinspace line 
    1580                                 // ------------------------ 
    1581  
    1582                                 hiddenFile.open(theProject.c_str(), ios::app); 
    1583  
    1584                                 hiddenFile << endl << endl << "order modinspace " << spaceName << endl; 
    1585  
    1586                                 hiddenFile.close(); 
    1587  
    1588                                 // The current object pointer is used here (more convenient) but it will maybe not be available when the function will be static 
    1589                                 // -----------------------------------------------------------------------------------------------------------------------------         
    1590  
    1591                                 // Set the current phase (here for a modinspace) 
    1592                                 // --------------------------------------------- 
    1593  
    1594                                 this -> setOrderPhase(1); 
    1595                                  
    1596                                 // Set the current space name 
    1597                                 // -------------------------- 
    1598  
    1599                                 this -> setName(spaceName);  
    1600  
    1601                                 // Reset the orderTokens string vector 
    1602                                 // ----------------------------------- 
    1603  
    1604                                 this -> orderTokens.clear(); 
    1605  
    1606                                 // Dedicated light structures that will be used to create the main graph then populate its properties  
    1607                                 // --------------------------------------------------------------------------------------------------- 
    1608  
    1609                                 vector<edge> edgeArray; 
    1610                                 vector<string> modulList; 
    1611                                 vector<int> valCi, valCj, valCk; 
    1612  
    1613                                 // Array of boolean values that will be used to know the dimensions on which the moduls are defined 
    1614                                 // ------------------------------------------------------------------------------------------------ 
    1615  
    1616                                 bool *isDefinedOn = new bool[3]; 
    1617  
    1618                                 isDefinedOn[0] = false; 
    1619                                 isDefinedOn[1] = false; 
    1620                                 isDefinedOn[2] = false; 
    1621  
    1622                                 // Scan the table of moduls to get relevable informations for setting up the graph and get informations on dimensions 
    1623                                 // ------------------------------------------------------------------------------------------------------------------ 
    1624  
    1625                                 for(Table<Modul>::iterator tok_tab = myModulTable.begin(); tok_tab < myModulTable.end(); tok_tab++) { 
    1626  
    1627                                         // If the modul is in the current space 
    1628                                         // ------------------------------------ 
    1629  
    1630                                         if(tok_tab -> getSpaceOrOperator() == spaceName) { 
    1631  
    1632                                                 // Select just the moduls not involved in noward 
    1633                                                 // --------------------------------------------- 
    1634  
    1635                                                 if(!tok_tab -> isNoward()) { 
    1636  
    1637                                                         // Get informations on modul names then populate the modulList vector that will be used by Boost to register the vertex_name property 
    1638                                                         // ---------------------------------------------------------------------------------------------------------------------------------- 
    1639  
    1640                                                         modulList.push_back(tok_tab -> getName()); 
    1641  
    1642                                                         // Get informations on dimensions where are defined the moduls then populate the isDefinedOn array 
    1643                                                         // ----------------------------------------------------------------------------------------------- 
    1644  
    1645                                                         if(tok_tab -> getYA(1) > 0) isDefinedOn[0] = true; 
    1646                                                         if(tok_tab -> getYA(2) > 0) isDefinedOn[1] = true; 
    1647                                                         if(tok_tab -> getYA(3) > 0) isDefinedOn[2] = true; 
    1648                                                 }  
    1649                                         }  
    1650                                 }  
    1651                          
    1652                                 // Avoid to work on an empty set 
    1653                                 // ----------------------------- 
    1654  
    1655                                 if(modulList.size() > 0) {       
    1656  
    1657  
    1658                                         // Scan the table of the connections to get all relevable informations for generating the order statement 
    1659                                         // ------------------------------------------------------------------------------------------------------ 
    1660  
    1661                                         for(Table<Connection>::iterator tok_tab = myConnectionTable.begin(); tok_tab < myConnectionTable.end(); tok_tab++) { 
    1662  
    1663                                                 // Select just the dependencies defined on the current time 
    1664                                                 // --------------------------------------------------------- 
    1665  
    1666                                                 if(tok_tab -> getT() > -1) { 
    1667  
    1668                                                         Table<Modul>::iterator itSource = getModule(tok_tab -> getOutModule(), myModulTable); 
    1669                                                         Table<Modul>::iterator itTarget = getModule(tok_tab -> getInModule(), myModulTable); 
    1670  
    1671  
    1672                                                                 // If both source and target modules are in the current space  
    1673                                                                 // ---------------------------------------------------------- 
    1674  
    1675                                                                 if(itSource -> getSpaceOrOperator() == spaceName && itTarget -> getSpaceOrOperator() == spaceName) { 
    1676  
    1677  
    1678                                                                         // Select just the moduls not involved in noward (match the condition used to create the modulList vector) 
    1679                                                                         // ------------------------------------------------------------------------------------------------------- 
    1680  
    1681                                                                         if(!itSource -> isNoward() && !itTarget -> isNoward() ) { 
    1682  
    1683                                                                                 string sourceName = itSource -> getName(); 
    1684                                                                                 string targetName = itTarget -> getName(); 
    1685  
    1686                                                                                 // Setting all pair of integer values that will  be used by Boost to manage the edges 
    1687                                                                                 // ---------------------------------------------------------------------------------- 
    1688  
    1689                                                                                 int modPairOne = getModulIndex(itSource -> getName(), modulList, modulList.size()); 
    1690                                                                                 int modPairTwo = getModulIndex(itTarget -> getName(), modulList, modulList.size()); 
    1691          
    1692                                                                                 edgeArray.push_back(edge(modPairOne, modPairTwo)); 
    1693  
    1694                                                                                 // Getting informations about spatial dependency between moduls for the dimension i then populate the dedicated vector 
    1695                                                                                 // ------------------------------------------------------------------------------------------------------------------- 
    1696  
    1697                                                                                 valCi.push_back(tok_tab -> getI()); 
    1698  
    1699                                                                                 // Getting informations about spatial dependency between moduls for the dimension j then populate the dedicated vector 
    1700                                                                                 // ------------------------------------------------------------------------------------------------------------------- 
    1701  
    1702                                                                                 valCj.push_back(tok_tab -> getJ()); 
    1703  
    1704                                                                                 // Getting informations about spatial dependency between moduls for the dimension k then populate the dedicated vector 
    1705                                                                                 // ------------------------------------------------------------------------------------------------------------------- 
    1706  
    1707                                                                                 valCk.push_back(tok_tab -> getK()); 
    1708          
    1709                                                                         } 
    1710                                                                 } 
    1711                                                         } 
    1712                                                 }    
    1713  
    1714                                         // Get the number of dimensions on which tho moduls are defined 
    1715                                         // ------------------------------------------------------------ 
    1716  
    1717                                         switch(isDefinedOn[0] + isDefinedOn[1] + isDefinedOn[2]) { 
    1718  
    1719                                         // If the moduls are defined on on dimension  
    1720                                         // ----------------------------------------- 
    1721          
    1722                                         case 1 :  
    1723  
    1724                                         // Modify the spatial dependencies vector to offset i dimension to the k dimension then set the dependencies to zero for i and j dimensions 
    1725                                         // ---------------------------------------------------------------------------------------------------------------------------------------- 
    1726  
    1727                                         to3D(1, valCi, valCj, valCk, edgeArray.size()); 
    1728  
    1729  
    1730                                         resetGraph(myGraph); 
    1731  
    1732                                         // Create the main graph with the informations collected (and modified for spatial dependencies) by scanning YAO tables 
    1733                                         // -------------------------------------------------------------------------------------------------------------------- 
    1734  
    1735                                         generateGraph(myGraph, valCi, valCj, valCk, modulList, edgeArray); 
    1736  
    1737                                         // Launch the main function that will create the vector 3D components, the vectors of 2D components then the vectors of 1D components 
    1738                                         // ----------------------------------------------------------------------------------------------------------------------------------  
    1739  
    1740                                         setOuter(outerComp, middleComp, innerComp, myGraph); 
    1741  
    1742                                         // Read the vector of 1D components to display the order statement (the two first dimensions have dummy values, then the third one is read as the first one)  
    1743                                         // --------------------------------------------------------------------------------------------------------------------------------------------------------- 
    1744  
    1745                                         read1D(outerComp, middleComp, innerComp, myGraph); 
    1746  
    1747                                         break; 
    1748  
    1749                                         case 2 : 
    1750  
    1751                                         // Modify the spatial dependencies vector to offset i and j dimensions to k j and k dimensions then set the dependencies to zero for the i dimension 
    1752                                         // ------------------------------------------------------------------------------------------------------------------------------------------------- 
    1753  
    1754                                         to3D(2, valCi, valCj, valCk, edgeArray.size()); 
    1755  
    1756                                         resetGraph(myGraph); 
    1757  
    1758                                         // Create the main graph with the informations collected (and modified for spatial dependencies) by scanning YAO tables 
    1759                                         // -------------------------------------------------------------------------------------------------------------------- 
    1760  
    1761                                         generateGraph(myGraph, valCi, valCj, valCk, modulList, edgeArray); 
    1762  
    1763                                         // Launch the main function that will create the vector 3D components, the vectors of 2D components then the vectors of 1D components 
    1764                                         // ----------------------------------------------------------------------------------------------------------------------------------  
    1765  
    1766                                         setOuter(outerComp, middleComp, innerComp, myGraph); 
    1767  
    1768                                         // Read the vector of 2D components to display the order statement (the first dimension have dummy value, then the second and third are read as the first and second) 
    1769                                         // ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
    1770  
    1771                                         read2D(outerComp, middleComp, innerComp, myGraph);  
    1772  
    1773                                          
    1774  
    1775                                          
    1776  
    1777                                         break; 
    1778  
    1779                                         case 3 :  
    1780  
    1781                                         resetGraph(myGraph); 
    1782          
    1783                                         // Create the main graph with the informations collectedby scanning YAO tables 
    1784                                         // -------------------------------------------------------------------------- 
    1785                  
    1786                                         generateGraph(myGraph, valCi, valCj, valCk, modulList, edgeArray); 
    1787  
    1788                                         // Launch the main function that will create the vector 3D components, the vectors of 2D components then the vectors of 1D components 
    1789                                         // ----------------------------------------------------------------------------------------------------------------------------------  
    1790  
    1791                                         setOuter(outerComp, middleComp, innerComp, myGraph); 
    1792  
    1793                                         // Read the vector of 3D components 
    1794                                         // -------------------------------- 
    1795  
    1796                                         read3D(outerComp, middleComp, innerComp, myGraph); 
    1797  
    1798                                         break; 
    1799  
    1800                                         } 
    1801                                 }  
    1802                          
    1803                                 hiddenFile.open(theProject.c_str(), ios::app); 
    1804  
    1805                                 // Close the current modinspace statement 
    1806                                 // -------------------------------------- 
    1807  
    1808                                 hiddenFile << endl << "forder"; 
    1809  
    1810                                 hiddenFile.close(); 
    1811  
    1812                                 // Insert in the order Table the current Order (which contain all informations on the current modinspace) 
    1813                                 // ------------------------------------------------------------------------------------------------------ 
    1814  
    1815                                 theOrderTable.push_back(*this); 
    1816  
    1817                         } 
    1818                 } 
    1819         } 
    1820  
    1821  
    1822         /* 
     1574                                string spaceName = trajMap.find(spacesList[noTopo]) -> first; 
     1575 
     1576                                // Show the modinspace line 
     1577                                // ------------------------ 
     1578 
     1579                                hiddenFile.open(theProject.c_str(), ios::app); 
     1580 
     1581                                hiddenFile << endl << endl << "order modinspace " << spaceName << endl; 
     1582 
     1583                                hiddenFile.close(); 
     1584 
     1585                                // The current object pointer is used here (more convenient) but it will maybe not be available when the function will be static 
     1586                                // -----------------------------------------------------------------------------------------------------------------------------         
     1587 
     1588                                // Set the current phase (here for a modinspace) 
     1589                                // --------------------------------------------- 
     1590 
     1591                                this -> setOrderPhase(1); 
     1592 
     1593                                // Set the current space name 
     1594                                // -------------------------- 
     1595 
     1596                                this -> setName(spaceName); 
     1597 
     1598                                // Reset the orderTokens string vector 
     1599                                // ----------------------------------- 
     1600 
     1601                                this -> orderTokens.clear(); 
     1602 
     1603                                // Dedicated light structures that will be used to create the main graph then populate its properties  
     1604                                // --------------------------------------------------------------------------------------------------- 
     1605 
     1606                                vector<edge> edgeArray; 
     1607                                vector<string> modulList; 
     1608                                vector<int> valCi, valCj, valCk; 
     1609 
     1610                                // Array of boolean values that will be used to know the dimensions on which the moduls are defined 
     1611                                // ------------------------------------------------------------------------------------------------ 
     1612 
     1613                                bool *isDefinedOn = new bool[3]; 
     1614 
     1615                                isDefinedOn[0] = false; 
     1616                                isDefinedOn[1] = false; 
     1617                                isDefinedOn[2] = false; 
     1618 
     1619                                // Scan the table of moduls to get relevable informations for setting up the graph and get informations on dimensions 
     1620                                // ------------------------------------------------------------------------------------------------------------------ 
     1621 
     1622                                for(Table<Modul>::iterator tok_tab = myModulTable.begin(); tok_tab < myModulTable.end(); tok_tab++) { 
     1623 
     1624                                        // If the modul is in the current space 
     1625                                        // ------------------------------------ 
     1626 
     1627                                        if(tok_tab -> getSpaceOrOperator() == spaceName) { 
     1628 
     1629                                                // Select just the moduls not involved in noward 
     1630                                                // --------------------------------------------- 
     1631 
     1632                                                if(!tok_tab -> isNoward()) { 
     1633 
     1634                                                        // Get informations on modul names then populate the modulList vector that will be used by Boost to register the vertex_name property 
     1635                                                        // ---------------------------------------------------------------------------------------------------------------------------------- 
     1636 
     1637                                                        modulList.push_back(tok_tab -> getName()); 
     1638 
     1639                                                        // Get informations on dimensions where are defined the moduls then populate the isDefinedOn array 
     1640                                                        // ----------------------------------------------------------------------------------------------- 
     1641 
     1642                                                        if(tok_tab -> getYA(1) > 0) isDefinedOn[0] = true; 
     1643                                                        if(tok_tab -> getYA(2) > 0) isDefinedOn[1] = true; 
     1644                                                        if(tok_tab -> getYA(3) > 0) isDefinedOn[2] = true; 
     1645                                                } 
     1646                                        } 
     1647                                } 
     1648 
     1649                                // Avoid to work on an empty set 
     1650                                // ----------------------------- 
     1651 
     1652                                if(modulList.size() > 0) { 
     1653 
     1654 
     1655                                        // Scan the table of the connections to get all relevable informations for generating the order statement 
     1656                                        // ------------------------------------------------------------------------------------------------------ 
     1657 
     1658                                        for(Table<Connection>::iterator tok_tab = myConnectionTable.begin(); tok_tab < myConnectionTable.end(); tok_tab++) { 
     1659 
     1660                                                // Select just the dependencies defined on the current time 
     1661                                                // --------------------------------------------------------- 
     1662 
     1663                                                if(tok_tab -> getT() > -1) { 
     1664 
     1665                                                        Table<Modul>::iterator itSource = getModule(tok_tab -> getOutModule(), myModulTable); 
     1666                                                        Table<Modul>::iterator itTarget = getModule(tok_tab -> getInModule(), myModulTable); 
     1667 
     1668 
     1669                                                                // If both source and target modules are in the current space  
     1670                                                                // ---------------------------------------------------------- 
     1671 
     1672                                                                if(itSource -> getSpaceOrOperator() == spaceName && itTarget -> getSpaceOrOperator() == spaceName) { 
     1673 
     1674 
     1675                                                                        // Select just the moduls not involved in noward (match the condition used to create the modulList vector) 
     1676                                                                        // ------------------------------------------------------------------------------------------------------- 
     1677 
     1678                                                                        if(!itSource -> isNoward() && !itTarget -> isNoward() ) { 
     1679 
     1680                                                                                string sourceName = itSource -> getName(); 
     1681                                                                                string targetName = itTarget -> getName(); 
     1682 
     1683                                                                                // Setting all pair of integer values that will  be used by Boost to manage the edges 
     1684                                                                                // ---------------------------------------------------------------------------------- 
     1685 
     1686                                                                                int modPairOne = getModulIndex(itSource -> getName(), modulList, modulList.size()); 
     1687                                                                                int modPairTwo = getModulIndex(itTarget -> getName(), modulList, modulList.size()); 
     1688 
     1689                                                                                edgeArray.push_back(edge(modPairOne, modPairTwo)); 
     1690 
     1691                                                                                // Getting informations about spatial dependency between moduls for the dimension i then populate the dedicated vector 
     1692                                                                                // ------------------------------------------------------------------------------------------------------------------- 
     1693 
     1694                                                                                valCi.push_back(tok_tab -> getI()); 
     1695 
     1696                                                                                // Getting informations about spatial dependency between moduls for the dimension j then populate the dedicated vector 
     1697                                                                                // ------------------------------------------------------------------------------------------------------------------- 
     1698 
     1699                                                                                valCj.push_back(tok_tab -> getJ()); 
     1700 
     1701                                                                                // Getting informations about spatial dependency between moduls for the dimension k then populate the dedicated vector 
     1702                                                                                // ------------------------------------------------------------------------------------------------------------------- 
     1703 
     1704                                                                                valCk.push_back(tok_tab -> getK()); 
     1705 
     1706                                                                        } 
     1707                                                                } 
     1708                                                        } 
     1709                                                } 
     1710 
     1711                                        // Get the number of dimensions on which tho moduls are defined 
     1712                                        // ------------------------------------------------------------ 
     1713 
     1714                                        switch(isDefinedOn[0] + isDefinedOn[1] + isDefinedOn[2]) { 
     1715 
     1716                                        // If the moduls are defined on on dimension  
     1717                                        // ----------------------------------------- 
     1718 
     1719                                        case 1 : 
     1720 
     1721                                        // Modify the spatial dependencies vector to offset i dimension to the k dimension then set the dependencies to zero for i and j dimensions 
     1722                                        // ---------------------------------------------------------------------------------------------------------------------------------------- 
     1723 
     1724                                        to3D(1, valCi, valCj, valCk, edgeArray.size()); 
     1725 
     1726 
     1727                                        resetGraph(myGraph); 
     1728 
     1729                                        // Create the main graph with the informations collected (and modified for spatial dependencies) by scanning YAO tables 
     1730                                        // -------------------------------------------------------------------------------------------------------------------- 
     1731 
     1732                                        generateGraph(myGraph, valCi, valCj, valCk, modulList, edgeArray); 
     1733 
     1734                                        // Launch the main function that will create the vector 3D components, the vectors of 2D components then the vectors of 1D components 
     1735                                        // ----------------------------------------------------------------------------------------------------------------------------------  
     1736 
     1737                                        setOuter(outerComp, middleComp, innerComp, myGraph); 
     1738 
     1739                                        // Read the vector of 1D components to display the order statement (the two first dimensions have dummy values, then the third one is read as the first one)  
     1740                                        // --------------------------------------------------------------------------------------------------------------------------------------------------------- 
     1741 
     1742                                        read1D(outerComp, middleComp, innerComp, myGraph); 
     1743 
     1744                                        break; 
     1745 
     1746                                        case 2 : 
     1747 
     1748                                        // Modify the spatial dependencies vector to offset i and j dimensions to k j and k dimensions then set the dependencies to zero for the i dimension 
     1749                                        // ------------------------------------------------------------------------------------------------------------------------------------------------- 
     1750 
     1751                                        to3D(2, valCi, valCj, valCk, edgeArray.size()); 
     1752 
     1753                                        resetGraph(myGraph); 
     1754 
     1755                                        // Create the main graph with the informations collected (and modified for spatial dependencies) by scanning YAO tables 
     1756                                        // -------------------------------------------------------------------------------------------------------------------- 
     1757 
     1758                                        generateGraph(myGraph, valCi, valCj, valCk, modulList, edgeArray); 
     1759 
     1760                                        // Launch the main function that will create the vector 3D components, the vectors of 2D components then the vectors of 1D components 
     1761                                        // ----------------------------------------------------------------------------------------------------------------------------------  
     1762 
     1763                                        setOuter(outerComp, middleComp, innerComp, myGraph); 
     1764 
     1765                                        // Read the vector of 2D components to display the order statement (the first dimension have dummy value, then the second and third are read as the first and second) 
     1766                                        // ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
     1767 
     1768                                        read2D(outerComp, middleComp, innerComp, myGraph); 
     1769 
     1770                                        break; 
     1771 
     1772                                        case 3 : 
     1773 
     1774                                        resetGraph(myGraph); 
     1775 
     1776                                        // Create the main graph with the informations collectedby scanning YAO tables 
     1777                                        // -------------------------------------------------------------------------- 
     1778 
     1779                                        generateGraph(myGraph, valCi, valCj, valCk, modulList, edgeArray); 
     1780 
     1781                                        // Launch the main function that will create the vector 3D components, the vectors of 2D components then the vectors of 1D components 
     1782                                        // ----------------------------------------------------------------------------------------------------------------------------------  
     1783 
     1784                                        setOuter(outerComp, middleComp, innerComp, myGraph); 
     1785 
     1786                                        // Read the vector of 3D components 
     1787                                        // -------------------------------- 
     1788 
     1789                                        read3D(outerComp, middleComp, innerComp, myGraph); 
     1790 
     1791                                        break; 
     1792 
     1793                                        } 
     1794                                } 
     1795 
     1796                                hiddenFile.open(theProject.c_str(), ios::app); 
     1797 
     1798                                // Close the current modinspace statement 
     1799                                // -------------------------------------- 
     1800 
     1801                                hiddenFile << endl << "forder"; 
     1802 
     1803                                hiddenFile.close(); 
     1804 
     1805                                // Insert in the order Table the current Order (which contain all informations on the current modinspace) 
     1806                                // ------------------------------------------------------------------------------------------------------ 
     1807 
     1808                                theOrderTable.push_back(*this); 
     1809 
     1810                        } 
     1811                } 
     1812        } 
     1813 
     1814 
     1815        /* 
     1816                           
     1817  
     1818 
     1819        /* 
    18231820         * Perform the spaceintraj writting.  
    18241821         * For each trajectory in the trajectories order that have been performed (maybe not needed). 
     
    18321829        for(int noTraj = 0; noTraj < trajOrder.size(); noTraj++) { 
    18331830 
    1834                 ofstream hiddenFile; 
    1835  
    1836                 hiddenFile.open(theProject.c_str(), ios::app); 
    1837  
    1838                 hiddenFile << endl << endl << "order spaceintraj " << trajOrder[noTraj].second << endl << endl << "\t"; 
    1839  
    1840                 // Set the current phase (which is a spacintraj here) 
    1841                 // -------------------------------------------------- 
    1842  
    1843                 this -> setOrderPhase(2);  
    1844  
    1845                 // Set the trajectory name 
    1846                 // ----------------------- 
    1847  
    1848                 this -> setName(trajOrder[noTraj].second);  
    1849  
    1850                 // Clear the orderTokens vector of string  
    1851                 // -------------------------------------- 
    1852  
    1853                 this -> orderTokens.clear(); 
     1831                ofstream hiddenFile; 
     1832 
     1833                hiddenFile.open(theProject.c_str(), ios::app); 
     1834 
     1835                hiddenFile << endl << endl << "order spaceintraj " << trajOrder[noTraj].second << endl << endl << "\t"; 
     1836 
     1837                // Set the current phase (which is a spacintraj here) 
     1838                // -------------------------------------------------- 
     1839 
     1840                this -> setOrderPhase(2); 
     1841 
     1842                // Set the trajectory name 
     1843                // ----------------------- 
     1844 
     1845                this -> setName(trajOrder[noTraj].second); 
     1846 
     1847                // Clear the orderTokens vector of string  
     1848                // -------------------------------------- 
     1849 
     1850                this -> orderTokens.clear(); 
    18541851 
    18551852 
     
    18721869                                        // ----------------------------------------- 
    18731870 
    1874                                         hiddenFile << trajMap.find(spacesList[noTopo]) -> first << " "; 
    1875  
    1876                                         // Insert the current trajectory name in the order tokens vector   
    1877                                         // ------------------------------------------------------------- 
    1878  
    1879                                         this -> orderTokens.push_back(trajMap.find(spacesList[noTopo]) -> first); 
     1871                                        hiddenFile << trajMap.find(spacesList[noTopo]) -> first << " "; 
     1872 
     1873                                        // Insert the current trajectory name in the order tokens vector   
     1874                                        // ------------------------------------------------------------- 
     1875 
     1876                                        this -> orderTokens.push_back(trajMap.find(spacesList[noTopo]) -> first); 
    18801877                        } 
    18811878                } 
     
    18851882        // --------------------------------------- 
    18861883 
    1887         hiddenFile << endl << endl <<  "forder"; 
    1888  
    1889         hiddenFile.close(); 
    1890  
    1891         // Insert in the Order table the current Order (which contain all informations on the current spaceintraj) 
    1892         // -------------------------------------------------------------------------------------------------------  
    1893  
    1894         theOrderTable.push_back(*this); 
     1884        hiddenFile << endl << endl <<  "forder"; 
     1885 
     1886        hiddenFile.close(); 
     1887 
     1888        // Insert in the Order table the current Order (which contain all informations on the current spaceintraj) 
     1889        // -------------------------------------------------------------------------------------------------------  
     1890 
     1891        theOrderTable.push_back(*this); 
    18951892 
    18961893        } 
     1894 
     1895        cout << endl << "Order directive generated" << endl; 
    18971896}; 
    18981897 
     
    19031902 
    19041903                if(nbDim == 2) { for(int noEdge = 0; noEdge < nbEdges; noEdge++) { 
    1905                  
    1906                                 valCk[noEdge] = valCj[noEdge]; 
     1904 
     1905                                valCk[noEdge] = valCj[noEdge]; 
    19071906                                valCj[noEdge] = valCi[noEdge]; 
    19081907                                valCi[noEdge] = 0; 
    1909                                 } 
    1910                 } 
     1908                                } 
     1909                } 
    19111910 
    19121911                if(nbDim == 1) { for(int noEdge = 0; noEdge < nbEdges; noEdge++) { 
    19131912 
    1914                                 valCk[noEdge] = valCi[noEdge]; 
     1913                                valCk[noEdge] = valCi[noEdge]; 
    19151914                                valCj[noEdge] = 0; 
    19161915                                valCi[noEdge] = 0; 
    1917                                 } 
    1918                 } 
     1916                                } 
     1917                } 
    19191918        }; 
    19201919 
     
    19381937        put(get(boost::vertex_topo_order_t(), currentGraph), *vertexIterOne, -1); 
    19391938        put(get(boost::vertex_affected_comp_t(), currentGraph), *vertexIterOne, -1); 
    1940         put(get(boost::vertex_original_id_t(), currentGraph), *vertexIterOne, *vertexIterOne);  
     1939        put(get(boost::vertex_original_id_t(), currentGraph), *vertexIterOne, *vertexIterOne); 
    19411940        } 
    19421941 
     
    19511950 
    19521951}; 
    1953   
     1952 
    19541953 
    19551954 
     
    20222021 
    20232022 
    2024                                 cout << endl << "innerComp[" << noComp3D << "][" << noFixed1 << "][" << noComp2D << "][" << noFixed2 << "][" << noComp1D << "].cfcSign[0].first :  "  
    2025                                      << innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].first << ", second : "    
    2026                                      << innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second << ", modules : "; 
    2027  
    2028                                 for(int noMod = 0; noMod < innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.size(); noMod++) { 
    2029  
    2030                                         cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod]) << " "; 
    2031                  
    2032                                 } 
    2033  
    2034                                 cout << endl; 
     2023                                cout << endl << "innerComp[" << noComp3D << "][" << noFixed1 << "][" << noComp2D << "][" << noFixed2 << "][" << noComp1D << "].cfcSign[0].first :  " 
     2024                                     << innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].first << ", second : " 
     2025                                     << innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second << ", modules : "; 
     2026 
     2027                                for(int noMod = 0; noMod < innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.size(); noMod++) { 
     2028 
     2029                                        cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod]) << " "; 
     2030 
     2031                                } 
     2032 
     2033                                cout << endl; 
    20352034 
    20362035                        } 
     
    20402039 
    20412040 
    2042   
    2043 void Order::setOuter(cfcStructTableType& outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph) {  
     2041 
     2042void Order::setOuter(cfcStructTableType& outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph) { 
    20442043 
    20452044        // ETAPE 3 DE LA PROCEDURE A DEUX DIMENSION  
    2046         // ----------------------------------------- 
    2047  
    2048         std::vector<int> outerComponentsList; 
    2049  
    2050         outerComponentsList.resize(boost::num_vertices(myGraph)); 
     2045        // ----------------------------------------- 
     2046 
     2047        std::vector<int> outerComponentsList; 
     2048 
     2049        outerComponentsList.resize(boost::num_vertices(myGraph)); 
    20512050 
    20522051        std::vector<vertexDescriptor> verticesDiscoverList(boost::num_vertices(myGraph)); 
    20532052 
    20542053        // Searching strong components in the main graph  
    2055         // --------------------------------------------- 
     2054        // --------------------------------------------- 
    20562055 
    20572056        boost::strong_components(myGraph, &outerComponentsList[0], boost::root_map(&verticesDiscoverList[0])); 
    20582057 
    20592058        // Updating vertices properties of the graph : set a component Id on each vertex 
    2060         // ----------------------------------------------------------------------------- 
     2059        // ----------------------------------------------------------------------------- 
    20612060 
    20622061        for(int i = 0; i < outerComponentsList.size(); i++) put(get(boost::vertex_affected_comp_t(), myGraph), i, outerComponentsList[i]); 
    20632062 
    20642063        // Setting the number of components that have been detected 
    2065         // -------------------------------------------------------- 
     2064        // -------------------------------------------------------- 
    20662065 
    20672066        int nbComponents = *max_element(outerComponentsList.begin(), outerComponentsList.end()) + 1; 
    20682067 
    20692068        // Resetting the size of the outer structure table : one table entry for each detected component  
    2070         // --------------------------------------------------------------------------------------------- 
    2071  
    2072         outerComp.resize(nbComponents); 
     2069        // --------------------------------------------------------------------------------------------- 
     2070 
     2071        outerComp.resize(nbComponents); 
    20732072 
    20742073        // ETAPE 5 DE LA PROCEDURE A DEUX DIMENSION  
    2075         // ---------------------------------------- 
    2076  
    2077         // For each component, set the sign for the first, second  and third dimensions then register this sign in the cfcSign attribute of the component's table entry 
    2078         // ------------------------------------------------------------------------------------------------------------------------------------------------------------ 
    2079  
    2080         int **isImposed = new int*[nbComponents]; 
    2081  
    2082         int **isImposed1D = new int*[nbComponents]; 
     2074        // ---------------------------------------- 
     2075 
     2076        // For each component, set the sign for the first, second  and third dimensions then register this sign in the cfcSign attribute of the component's table entry 
     2077        // ------------------------------------------------------------------------------------------------------------------------------------------------------------ 
     2078 
     2079        int **isImposed = new int*[nbComponents]; 
     2080 
     2081        int **isImposed1D = new int*[nbComponents]; 
    20832082 
    20842083        for(int i = 0; i < nbComponents; i++) isImposed[i] = new int[3]; 
    20852084 
    2086         for(int i = 0; i < nbComponents; i++) isImposed1D[i] = new int[3]; 
     2085        for(int i = 0; i < nbComponents; i++) isImposed1D[i] = new int[3]; 
    20872086 
    20882087        for(int noComponent = 0; noComponent < nbComponents; noComponent++) { 
    20892088 
    2090                 isImposed1D[noComponent][0] = 0; 
    2091                 isImposed1D[noComponent][1] = 0; 
    2092                 isImposed1D[noComponent][2] = 0; 
    2093  
    2094                 // Setting inial imposed values (0 mean not imposed) 
    2095                 // ------------------------------------------------- 
    2096  
    2097                 isImposed[noComponent][0] = 0; 
    2098                 isImposed[noComponent][1] = 0; 
    2099                 isImposed[noComponent][2] = 0;  
    2100  
    2101                 // Setting initial size of the cfcSign vector 
    2102                 // ------------------------------------------    
    2103          
    2104                 outerComp[noComponent].cfcSign.resize(3); 
    2105  
    2106                 // Setting initial axis numbers (i -> j -> k) 
    2107                 // ------------------------------------------ 
    2108  
    2109                 outerComp[noComponent].cfcSign[0].first = 0; 
    2110                 outerComp[noComponent].cfcSign[1].first = 1; 
    2111                 outerComp[noComponent].cfcSign[2].first = 2; 
    2112          
    2113                 // Getting the axis values (see getCommonSign comments) 
    2114                 // ---------------------------------------------------- 
    2115  
    2116                 outerComp[noComponent].cfcSign[0].second = getCommonSign(0, noComponent, myGraph); 
     2089                isImposed1D[noComponent][0] = 0; 
     2090                isImposed1D[noComponent][1] = 0; 
     2091                isImposed1D[noComponent][2] = 0; 
     2092 
     2093                // Setting inial imposed values (0 mean not imposed) 
     2094                // ------------------------------------------------- 
     2095 
     2096                isImposed[noComponent][0] = 0; 
     2097                isImposed[noComponent][1] = 0; 
     2098                isImposed[noComponent][2] = 0; 
     2099 
     2100                // Setting initial size of the cfcSign vector 
     2101                // ------------------------------------------    
     2102 
     2103                outerComp[noComponent].cfcSign.resize(3); 
     2104 
     2105                // Setting initial axis numbers (i -> j -> k) 
     2106                // ------------------------------------------ 
     2107 
     2108                outerComp[noComponent].cfcSign[0].first = 0; 
     2109                outerComp[noComponent].cfcSign[1].first = 1; 
     2110                outerComp[noComponent].cfcSign[2].first = 2; 
     2111 
     2112                // Getting the axis values (see getCommonSign comments) 
     2113                // ---------------------------------------------------- 
     2114 
     2115                outerComp[noComponent].cfcSign[0].second = getCommonSign(0, noComponent, myGraph); 
    21172116                outerComp[noComponent].cfcSign[1].second = getCommonSign(1, noComponent, myGraph); 
    21182117                outerComp[noComponent].cfcSign[2].second = getCommonSign(2, noComponent, myGraph); 
    21192118 
    2120                 // Detecting all possible axis combinations then setting the one corresponding to the current component  
    2121                 // ---------------------------------------------------------------------------------------------------- 
    2122  
    2123                 int sign0 = outerComp[noComponent].cfcSign[0].second; 
    2124                 int sign1 = outerComp[noComponent].cfcSign[1].second; 
    2125                 int sign2 = outerComp[noComponent].cfcSign[2].second; 
    2126  
    2127                 // If there is no connection between the vertices of the component (ie single modul without reflexive edge) 
     2119                // Detecting all possible axis combinations then setting the one corresponding to the current component  
     2120                // ---------------------------------------------------------------------------------------------------- 
     2121 
     2122                int sign0 = outerComp[noComponent].cfcSign[0].second; 
     2123                int sign1 = outerComp[noComponent].cfcSign[1].second; 
     2124                int sign2 = outerComp[noComponent].cfcSign[2].second; 
     2125 
     2126                // If there is no connection between the vertices of the component (ie single modul without reflexive edge) 
    21282127                // -------------------------------------------------------------------------------------------------------- 
    21292128 
    2130                 bool isConnected = true; 
    2131  
    2132                 if(sign0 == 3 && sign1 == 3 && sign2 == 3) {  
    2133                  
    2134                         outerComp[noComponent].cfcSign[0].second = 0; 
    2135                         outerComp[noComponent].cfcSign[1].second = 0; 
    2136                         outerComp[noComponent].cfcSign[2].second = 0; 
    2137          
    2138                         isConnected = false; 
    2139                 }  
    2140  
    2141                 if(isConnected) { 
    2142  
    2143                         // Detect the type of configuration of the component accordignly to its defined and not defined axis  
    2144                         // ------------------------------------------------------------------------------------------------- 
    2145  
    2146                         int noConf = -1; 
    2147                          
    2148                         if(sign0 != 2 && sign1 != 2 && sign2 != 2) noConf = 0;          // i -> j -> k (j and k free)  
    2149                         if(sign0 != 2 && sign1 != 2 && sign2 == 2) noConf = 1;          // i -> j -> k (j free)  
    2150                         if(sign0 != 2 && sign1 == 2 && sign2 == 2) noConf = 2;          // i -> j -> k 
    2151                         if(sign0 != 2 && sign1 == 2 && sign2 != 2) noConf = 3;          // i -> k -> j (k free) 
    2152                         if(sign0 == 2 && sign1 != 2 && sign2 != 2) noConf = 4;          // j -> i -> k (i free) 
    2153                         if(sign0 == 2 && sign1 != 2 && sign2 == 2) noConf = 5;          // j -> i -> k 
    2154                         if(sign0 == 2 && sign1 == 2 && sign2 != 2) noConf = 6;          // k -> i -> j 
    2155          
    2156                         // Detect the errors of the component accordignly to its defined and not defined axis and to the null values 
    2157                         // --------------------------------------------------------------------------------------------------------- 
    2158                          
    2159                         if(sign0 == 2 && sign1 == 2 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension   
    2160                         if(sign0 == 2 && sign1 == 2 && sign2 == 0) noConf = 7;          // Error : there is no common value in any dimension 
    2161                         if(sign0 == 2 && sign1 == 0 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension 
    2162                         if(sign0 == 0 && sign1 == 2 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension 
    2163                         if(sign0 == 2 && sign1 == 0 && sign2 == 0) noConf = 7;          // Error : there is no common value in any dimension 
    2164                         if(sign0 == 0 && sign1 == 2 && sign2 == 0) noConf = 7;          // Error : there is no common value in any dimension 
    2165                         if(sign0 == 0 && sign1 == 0 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension 
    2166                         if(sign0 == 0 && sign1 == 0 && sign2 == 0) noConf = 8;          // Error : cyclic dependency  
    2167  
    2168                         // Looking at combinations to set imposed values for the second axis (see "getImposed" comments) 
    2169                         // --------------------------------------------------------------------------------------------- 
    2170  
    2171                         if(noConf == 0 || noConf == 1 || noConf == 2) isImposed[noComponent][1] = getImposed(0, 1, noComponent, myGraph); 
    2172                         if(noConf == 3) isImposed[noComponent][2] = getImposed(0, 2, noComponent, myGraph); 
    2173                         if(noConf == 4) isImposed[noComponent][2] = getImposed(1, 2, noComponent, myGraph); 
    2174                         if(noConf == 5) isImposed[noComponent][1] = getImposed(1, 0, noComponent, myGraph); 
    2175                         if(noConf == 6) isImposed[noComponent][2] = getImposed(2, 0, noComponent, myGraph); 
    2176  
    2177                         // Set imposed values for the third axis (see "getImposed" comments) 
    2178                         // ---------------------------------------------------------------- 
    2179  
    2180                         isImposed1D[noComponent][0] = getImposed(0, noComponent, myGraph); 
    2181                         isImposed1D[noComponent][1] = getImposed(1, noComponent, myGraph); 
    2182                         isImposed1D[noComponent][2] = getImposed(2, noComponent, myGraph); 
    2183  
    2184                         // Looking at combinations to : 1 - sort the axis (number and value) inside the "cfcSign" array 
    2185                         //                              2 - reset axis value if this one is free 
    2186                         //                              3 - reset axis value if this one is imposed 
    2187                         // -------------------------------------------------------------------------------------------- 
    2188  
    2189                         switch(noConf) { 
    2190  
    2191                         case 0:          
    2192  
    2193                         outerComp[noComponent].cfcSign[1].second = 0;           // set j to free 
    2194                         outerComp[noComponent].cfcSign[2].second = 0;           // set k to free 
    2195  
    2196                         if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0];  
    2197                         if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][1]; 
    2198                         if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
    2199  
    2200                         if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
    2201                         if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][1]; 
    2202                         if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
    2203  
    2204                         // If the third axis does not have a common sign  
    2205                         // If the second axis have a common sign  
    2206                         // If it is not needed to decompose the third axis dimension  (see "isToDecompose" comments) 
    2207                         // Then set the axis value to 3 (means no common sign but no decomposition)  
    2208  
    2209                         if(outerComp[noComponent].cfcSign[2].second == 2)        
    2210                         if(outerComp[noComponent].cfcSign[1].second != 2)        
    2211                         if(!isToDecompose(2, myGraph)) 
    2212                  
    2213                         outerComp[noComponent].cfcSign[2].second = 3;                    
    2214  
    2215                         break; 
    2216  
    2217                         case 1: 
    2218  
    2219                         outerComp[noComponent].cfcSign[1].second = 0; 
    2220  
    2221                         if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0]; 
    2222                         if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][1]; 
    2223                         if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
    2224  
    2225                         if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
    2226                         if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][1]; 
    2227                         if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
    2228  
    2229                         if(outerComp[noComponent].cfcSign[2].second == 2) 
    2230                         if(outerComp[noComponent].cfcSign[1].second != 2)  
    2231                         if(!isToDecompose(2, myGraph)) 
    2232  
    2233                         outerComp[noComponent].cfcSign[2].second = 3; 
    2234  
    2235                         break; 
    2236  
    2237                         case 2: 
    2238  
    2239                         if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0]; 
    2240                         if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][1]; 
    2241                         if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
    2242  
    2243                         if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
    2244                         if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][1]; 
    2245                         if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
    2246  
    2247                         if(outerComp[noComponent].cfcSign[2].second == 2) 
    2248                         if(outerComp[noComponent].cfcSign[1].second != 2)  
    2249                         if(!isToDecompose(2, myGraph)) 
    2250                  
    2251                         outerComp[noComponent].cfcSign[2].second = 3; 
    2252  
    2253                         break; 
    2254  
    2255                         case 3: 
    2256  
    2257                         outerComp[noComponent].cfcSign[1].second = 0; 
    2258                         outerComp[noComponent].cfcSign[2].second = 2; 
    2259                         outerComp[noComponent].cfcSign[1].first = 2; 
    2260                         outerComp[noComponent].cfcSign[2].first = 1; 
    2261  
    2262                         if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0]; 
    2263                         if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][2]; 
    2264                         if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][1]; 
    2265  
    2266                         if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
    2267                         if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][2]; 
    2268                         if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][1];   
    2269  
    2270                         if(outerComp[noComponent].cfcSign[1].second == 2) 
    2271                         if(outerComp[noComponent].cfcSign[2].second != 2)  
    2272                         if(!isToDecompose(1, myGraph)) 
    2273          
    2274                         outerComp[noComponent].cfcSign[1].second = 3; 
    2275  
    2276                         break; 
    2277  
    2278                         case 4: 
    2279  
    2280                         outerComp[noComponent].cfcSign[0].second = outerComp[noComponent].cfcSign[1].second; 
    2281                         outerComp[noComponent].cfcSign[1].second = 0; 
    2282  
    2283                         outerComp[noComponent].cfcSign[2].second = 2; 
    2284                         outerComp[noComponent].cfcSign[0].first = 1; 
    2285                         outerComp[noComponent].cfcSign[1].first = 0; 
    2286                         outerComp[noComponent].cfcSign[2].first = 2; 
    2287  
    2288                         if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][1]; 
    2289                         if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][0]; 
    2290                         if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
    2291  
    2292                         if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][1]; 
    2293                         if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][0]; 
    2294                         if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
    2295  
    2296                         if(outerComp[noComponent].cfcSign[0].second == 2) 
    2297                         if(outerComp[noComponent].cfcSign[2].second != 2) 
    2298                         if(!isToDecompose(0, myGraph)) 
    2299  
    2300                         outerComp[noComponent].cfcSign[0].second = 3; 
    2301  
    2302                         break; 
    2303  
    2304                         case 5: 
    2305  
    2306                         outerComp[noComponent].cfcSign[0].second = outerComp[noComponent].cfcSign[1].second; 
    2307                         outerComp[noComponent].cfcSign[1].second = 2; 
    2308                         outerComp[noComponent].cfcSign[2].second = 2; 
    2309                         outerComp[noComponent].cfcSign[0].first = 1; 
    2310                         outerComp[noComponent].cfcSign[1].first = 0; 
    2311                         outerComp[noComponent].cfcSign[2].first = 2; 
    2312  
    2313                         if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][1]; 
    2314                         if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][0]; 
    2315                         if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
    2316  
    2317                         if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][1]; 
    2318                         if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][0]; 
    2319                         if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
    2320  
    2321                         if(outerComp[noComponent].cfcSign[2].second == 2) 
    2322                         if(outerComp[noComponent].cfcSign[0].second != 2) 
    2323                         if(!isToDecompose(2, myGraph)) 
    2324  
    2325                         outerComp[noComponent].cfcSign[2].second = 3; 
    2326  
    2327                  
    2328                         break; 
    2329  
    2330                         case 6: 
    2331          
    2332                         outerComp[noComponent].cfcSign[0].second = outerComp[noComponent].cfcSign[2].second; 
    2333                         outerComp[noComponent].cfcSign[1].second = 2; 
    2334                         outerComp[noComponent].cfcSign[2].second = 2; 
    2335                         outerComp[noComponent].cfcSign[0].first = 2; 
    2336                         outerComp[noComponent].cfcSign[1].first = 0; 
    2337                         outerComp[noComponent].cfcSign[2].first = 1; 
    2338  
    2339                         if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][2]; 
    2340                         if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][0]; 
    2341                         if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][1]; 
    2342  
    2343                         if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][2]; 
    2344                         if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][0]; 
    2345                         if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][1]; 
    2346  
    2347                         if(outerComp[noComponent].cfcSign[1].second == 2)        
    2348                         if(outerComp[noComponent].cfcSign[0].second != 2)  
    2349                         if(!isToDecompose(1, myGraph)) 
    2350  
    2351                         outerComp[noComponent].cfcSign[1].second = 3; 
    2352  
    2353                         break; 
    2354  
    2355                         // ETAPE 4 DE LA PROCEDURE A DEUX DIMENSION (cf. docs) 
    2356                         // --------------------------------------------------- 
    2357  
    2358                         case 7:  
    2359  
    2360                         cout << endl << "Error : no common value in the component including moduls "; 
    2361                         for(tie(vertexIterOne, vertexIterTwo) = vertices(myGraph); vertexIterOne != vertexIterTwo; ++vertexIterOne)  
    2362                                 if(get(boost::vertex_affected_comp_t(), myGraph, *vertexIterOne) == noComponent)  
    2363                                         cout << get(boost::vertex_name_t(), myGraph, *vertexIterOne) << " "; 
    2364                         // SORTIE PROGRAMME 
    2365  
    2366                         break; 
    2367  
    2368                         case 8:  
    2369  
    2370                         cout << endl << "Error : cyclic dependency in the component including moduls "; 
    2371                                 for(tie(vertexIterOne, vertexIterTwo) = vertices(myGraph); vertexIterOne != vertexIterTwo; ++vertexIterOne)  
    2372                                         if(get(boost::vertex_affected_comp_t(), myGraph, *vertexIterOne) == noComponent)  
    2373                                                 cout << get(boost::vertex_name_t(), myGraph, *vertexIterOne) << " "; 
    2374                         // SORTIE PROGRAMME 
    2375                          
    2376                         break;   
    2377  
    2378                         } 
    2379          
    2380                 } 
    2381  
    2382         } 
     2129                bool isConnected = true; 
     2130 
     2131                if(sign0 == 3 && sign1 == 3 && sign2 == 3) { 
     2132 
     2133                        outerComp[noComponent].cfcSign[0].second = 0; 
     2134                        outerComp[noComponent].cfcSign[1].second = 0; 
     2135                        outerComp[noComponent].cfcSign[2].second = 0; 
     2136 
     2137                        isConnected = false; 
     2138                } 
     2139 
     2140                if(isConnected) { 
     2141 
     2142                        // Detect the type of configuration of the component accordignly to its defined and not defined axis  
     2143                        // ------------------------------------------------------------------------------------------------- 
     2144 
     2145                        int noConf = -1; 
     2146 
     2147                        if(sign0 != 2 && sign1 != 2 && sign2 != 2) noConf = 0;          // i -> j -> k (j free and k free)  
     2148                        if(sign0 != 2 && sign1 != 2 && sign2 == 2) noConf = 1;          // i -> j -> k (j free)  
     2149                        if(sign0 != 2 && sign1 == 2 && sign2 == 2) noConf = 2;          // i -> j -> k (none free) 
     2150                        if(sign0 != 2 && sign1 == 2 && sign2 != 2) noConf = 3;          // i -> k -> j (k free) 
     2151                        if(sign0 == 2 && sign1 != 2 && sign2 != 2) noConf = 4;          // j -> k -> i (k free)  - Changed from j -> i -> k (i free)        
     2152                        if(sign0 == 2 && sign1 != 2 && sign2 == 2) noConf = 5;          // j -> i -> k (none free) 
     2153                        if(sign0 == 2 && sign1 == 2 && sign2 != 2) noConf = 6;          // k -> i -> j (none free) 
     2154 
     2155                        // Detect the errors of the component accordignly to its defined and not defined axis and to the null values 
     2156                        // --------------------------------------------------------------------------------------------------------- 
     2157 
     2158                        if(sign0 == 2 && sign1 == 2 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension   
     2159                        if(sign0 == 2 && sign1 == 2 && sign2 == 0) noConf = 7;          // Error : there is no common value in any dimension 
     2160                        if(sign0 == 2 && sign1 == 0 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension 
     2161                        if(sign0 == 0 && sign1 == 2 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension 
     2162                        if(sign0 == 2 && sign1 == 0 && sign2 == 0) noConf = 7;          // Error : there is no common value in any dimension 
     2163                        if(sign0 == 0 && sign1 == 2 && sign2 == 0) noConf = 7;          // Error : there is no common value in any dimension 
     2164                        if(sign0 == 0 && sign1 == 0 && sign2 == 2) noConf = 7;          // Error : there is no common value in any dimension 
     2165                        if(sign0 == 0 && sign1 == 0 && sign2 == 0) noConf = 8;          // Error : cyclic dependency  
     2166 
     2167                        // Looking at combinations to set imposed values for the second axis (see "getImposed" comments) 
     2168                        // --------------------------------------------------------------------------------------------- 
     2169 
     2170                        if(noConf == 0 || noConf == 1 || noConf == 2) isImposed[noComponent][1] = getImposed(0, 1, noComponent, myGraph); 
     2171                        if(noConf == 3) isImposed[noComponent][2] = getImposed(0, 2, noComponent, myGraph); 
     2172                        if(noConf == 4) isImposed[noComponent][2] = getImposed(1, 2, noComponent, myGraph); 
     2173                        if(noConf == 5) isImposed[noComponent][0] = getImposed(1, 0, noComponent, myGraph);     // Changed from isImposed[noComponent][1] = getImposed(1, 0, noComponent, myGraph); 
     2174                        if(noConf == 6) isImposed[noComponent][0] = getImposed(2, 0, noComponent, myGraph);     // Changed from isImposed[noComponent][2] = getImposed(2, 0, noComponent, myGraph); 
     2175 
     2176                        // Set imposed values for the third axis (see "getImposed" comments) 
     2177                        // ---------------------------------------------------------------- 
     2178 
     2179                        isImposed1D[noComponent][0] = getImposed(0, noComponent, myGraph); 
     2180                        isImposed1D[noComponent][1] = getImposed(1, noComponent, myGraph); 
     2181                        isImposed1D[noComponent][2] = getImposed(2, noComponent, myGraph); 
     2182 
     2183 
     2184                        // Looking at combinations to : 1 - sort the axis (number and value) inside the "cfcSign" array 
     2185                        //                              2 - reset axis value if this one is free  
     2186                        //                              3 - reset axis value if this one is imposed 
     2187                        // -------------------------------------------------------------------------------------------- 
     2188 
     2189                        bool isNoError = true; 
     2190 
     2191                        switch(noConf) { 
     2192 
     2193                        case 0: 
     2194 
     2195                        outerComp[noComponent].cfcSign[1].second = 0;           // set j to free 
     2196                        outerComp[noComponent].cfcSign[2].second = 0;           // set k to free 
     2197 
     2198                        if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0]; 
     2199                        if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][1]; 
     2200                        if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
     2201 
     2202                        if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
     2203                        if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][1]; 
     2204                        if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
     2205 
     2206                        if(outerComp[noComponent].cfcSign[1].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[1].second = 3; 
     2207                        if(outerComp[noComponent].cfcSign[2].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[2].second = 3; 
     2208 
     2209                        break; 
     2210 
     2211                        case 1: 
     2212 
     2213                        outerComp[noComponent].cfcSign[1].second = 0; 
     2214 
     2215                        if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0]; 
     2216                        if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][1]; 
     2217                        if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
     2218 
     2219                        if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
     2220                        if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][1]; 
     2221                        if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
     2222 
     2223                        if(outerComp[noComponent].cfcSign[1].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[1].second = 3; 
     2224                        if(outerComp[noComponent].cfcSign[2].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[2].second = 3; 
     2225 
     2226 
     2227                        break; 
     2228 
     2229                        case 2: 
     2230 
     2231                        if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0]; 
     2232                        if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][1]; 
     2233                        if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
     2234 
     2235                        if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
     2236                        if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][1]; 
     2237                        if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
     2238 
     2239                        if(outerComp[noComponent].cfcSign[1].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[1].second = 3; 
     2240                        if(outerComp[noComponent].cfcSign[2].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[2].second = 3; 
     2241 
     2242 
     2243                        break; 
     2244 
     2245                        case 3: 
     2246 
     2247                        outerComp[noComponent].cfcSign[1].second = 0; 
     2248                        outerComp[noComponent].cfcSign[2].second = 2; 
     2249                        outerComp[noComponent].cfcSign[1].first = 2; 
     2250                        outerComp[noComponent].cfcSign[2].first = 1; 
     2251 
     2252                        if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][0]; 
     2253                        if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][2]; 
     2254                        if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][1]; 
     2255 
     2256                        if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][0]; 
     2257                        if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][2]; 
     2258                        if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][1]; 
     2259 
     2260                        if(outerComp[noComponent].cfcSign[1].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[1].second = 3; 
     2261                        if(outerComp[noComponent].cfcSign[2].second == 2 && !isToDecompose2D(0, noComponent, myGraph)) outerComp[noComponent].cfcSign[2].second = 3; 
     2262 
     2263 
     2264                        break; 
     2265 
     2266                        case 4: 
     2267 
     2268                        outerComp[noComponent].cfcSign[0].second = outerComp[noComponent].cfcSign[1].second; 
     2269                        outerComp[noComponent].cfcSign[1].second = 0; 
     2270 
     2271                        outerComp[noComponent].cfcSign[2].second = 2; 
     2272                        outerComp[noComponent].cfcSign[0].first = 1; 
     2273                        outerComp[noComponent].cfcSign[1].first = 0; 
     2274                        outerComp[noComponent].cfcSign[2].first = 2; 
     2275 
     2276                        if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][1]; 
     2277                        if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][0]; 
     2278                        if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
     2279 
     2280                        if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][1]; 
     2281                        if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][0]; 
     2282                        if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
     2283 
     2284                        if(outerComp[noComponent].cfcSign[1].second == 2 && !isToDecompose2D(1, noComponent, myGraph)) outerComp[noComponent].cfcSign[1].second = 3; 
     2285                        if(outerComp[noComponent].cfcSign[2].second == 2 && !isToDecompose2D(1, noComponent, myGraph)) outerComp[noComponent].cfcSign[2].second = 3; 
     2286 
     2287                        break; 
     2288 
     2289                        case 5: 
     2290 
     2291                        outerComp[noComponent].cfcSign[0].second = outerComp[noComponent].cfcSign[1].second; 
     2292                        outerComp[noComponent].cfcSign[1].second = 2; 
     2293                        outerComp[noComponent].cfcSign[2].second = 2; 
     2294                        outerComp[noComponent].cfcSign[0].first = 1; 
     2295                        outerComp[noComponent].cfcSign[1].first = 0; 
     2296                        outerComp[noComponent].cfcSign[2].first = 2; 
     2297 
     2298                        if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][1]; 
     2299                        if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][0]; 
     2300                        if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][2]; 
     2301 
     2302                        if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][1]; 
     2303                        if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][0]; 
     2304                        if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][2]; 
     2305 
     2306                        if(outerComp[noComponent].cfcSign[1].second == 2 && !isToDecompose2D(1, noComponent, myGraph)) outerComp[noComponent].cfcSign[1].second = 3; 
     2307                        if(outerComp[noComponent].cfcSign[2].second == 2 && !isToDecompose2D(1, noComponent, myGraph)) outerComp[noComponent].cfcSign[2].second = 3; 
     2308 
     2309                        break; 
     2310 
     2311                        case 6: 
     2312 
     2313                        outerComp[noComponent].cfcSign[0].second = outerComp[noComponent].cfcSign[2].second; 
     2314                        outerComp[noComponent].cfcSign[1].second = 2; 
     2315                        outerComp[noComponent].cfcSign[2].second = 2; 
     2316                        outerComp[noComponent].cfcSign[0].first = 2; 
     2317                        outerComp[noComponent].cfcSign[1].first = 0; 
     2318                        outerComp[noComponent].cfcSign[2].first = 1; 
     2319 
     2320                        if(isImposed[noComponent][2] != 0) outerComp[noComponent].cfcSign[0].second = isImposed[noComponent][2]; 
     2321                        if(isImposed[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed[noComponent][0]; 
     2322                        if(isImposed[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed[noComponent][1]; 
     2323 
     2324                        if(isImposed1D[noComponent][2] != 0) outerComp[noComponent].cfcSign[0].second = isImposed1D[noComponent][2]; 
     2325                        if(isImposed1D[noComponent][0] != 0) outerComp[noComponent].cfcSign[1].second = isImposed1D[noComponent][0]; 
     2326                        if(isImposed1D[noComponent][1] != 0) outerComp[noComponent].cfcSign[2].second = isImposed1D[noComponent][1]; 
     2327 
     2328                        if(outerComp[noComponent].cfcSign[1].second == 2 && !isToDecompose2D(2, noComponent, myGraph)) outerComp[noComponent].cfcSign[1].second = 3; 
     2329                        if(outerComp[noComponent].cfcSign[2].second == 2 && !isToDecompose2D(2, noComponent, myGraph)) outerComp[noComponent].cfcSign[2].second = 3; 
     2330 
     2331                        break; 
     2332 
     2333                        // ETAPE 4 DE LA PROCEDURE A DEUX DIMENSION (cf. docs) 
     2334                        // --------------------------------------------------- 
     2335 
     2336                        case 7: 
     2337 
     2338                        isNoError = false; 
     2339 
     2340                        cout << endl << "Error : dependencies between modules "; 
     2341                        for(tie(vertexIterOne, vertexIterTwo) = vertices(myGraph); vertexIterOne != vertexIterTwo; ++vertexIterOne) 
     2342                                if(get(boost::vertex_affected_comp_t(), myGraph, *vertexIterOne) == noComponent) 
     2343                                        cout << get(boost::vertex_name_t(), myGraph, *vertexIterOne) << " "; 
     2344                        cout << " can not be satisfied (no path found) => Order generation aborted" << endl << endl; 
     2345 
     2346 
     2347                        break; 
     2348 
     2349 
     2350                        case 8: 
     2351 
     2352                        isNoError = false; 
     2353 
     2354                        cout << endl << "Error : a cycle appear between modules "; 
     2355                                for(tie(vertexIterOne, vertexIterTwo) = vertices(myGraph); vertexIterOne != vertexIterTwo; ++vertexIterOne) 
     2356                                        if(get(boost::vertex_affected_comp_t(), myGraph, *vertexIterOne) == noComponent) 
     2357                                                cout << get(boost::vertex_name_t(), myGraph, *vertexIterOne) << " "; 
     2358                        cout << " => Order generation aborted" << endl << endl; 
     2359 
     2360                        break; 
     2361 
     2362 
     2363                        } 
     2364 
     2365                ENFORCE(isNoError); 
     2366 
     2367                } 
     2368 
     2369        } 
    23832370 
    23842371 
    23852372        // ETAPE 6 DE LA PROCEDURE A DEUX DIMENSION  
    2386         // ---------------------------------------- 
    2387  
    2388         myGraphType cfcGraph; 
    2389  
    2390         // Create a graph whose vertices are the components (reduced graph)      
    2391         // ---------------------------------------------------------------- 
    2392  
    2393         reduceGraph(myGraph, cfcGraph, nbComponents);  
     2373        // ---------------------------------------- 
     2374 
     2375        myGraphType cfcGraph; 
     2376 
     2377        // Create a graph whose vertices are the components (reduced graph)      
     2378        // ---------------------------------------------------------------- 
     2379 
     2380        reduceGraph(myGraph, cfcGraph, nbComponents); 
    23942381 
    23952382        // ETAPE 7 DE LA PROCEDURE A DEUX DIMENSION  
    2396         // ---------------------------------------- 
    2397  
    2398         std::deque<int> topoOrder; 
    2399  
    2400         if(boost::num_vertices(cfcGraph) > 1) {  
     2383        // ---------------------------------------- 
     2384 
     2385        std::deque<int> topoOrder; 
     2386 
     2387        if(boost::num_vertices(cfcGraph) > 1) { 
    24012388 
    24022389 
    24032390        // Perform a topological sort on the reduced graph 
    2404         // ----------------------------------------------- 
     2391        // ----------------------------------------------- 
    24052392 
    24062393        boost::topological_sort(cfcGraph, std::front_inserter(topoOrder), boost::vertex_index_map(boost::identity_property_map())); 
    24072394 
    24082395        // ETAPE 8 DE LA PROCEDURE A DEUX DIMENSION  
    2409         // ---------------------------------------- 
     2396        // ---------------------------------------- 
    24102397 
    24112398        // Sort the outer structure table elements (main graph components) accordignly to the sorting performed on the reduced graph  
    2412         // ------------------------------------------------------------------------------------------------------------------------- 
    2413  
    2414                 int **sortedIsImposed = new int*[nbComponents]; 
    2415  
    2416                 for(int i = 0; i < nbComponents; i++) sortedIsImposed[i] = new int[3]; 
    2417  
    2418                 vector<cfcStruct> sortedOuterCfcStructTable; 
    2419  
    2420                 for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) { 
    2421  
    2422                         sortedOuterCfcStructTable.push_back(outerComp[topoOrder[noComponent]]); 
    2423  
    2424                         sortedIsImposed[noComponent][0] = isImposed[topoOrder[noComponent]][0]; 
    2425                         sortedIsImposed[noComponent][1] = isImposed[topoOrder[noComponent]][1]; 
    2426                         sortedIsImposed[noComponent][2] = isImposed[topoOrder[noComponent]][2]; 
    2427  
    2428                 } 
    2429  
    2430                 outerComp.clear(); 
    2431  
    2432                 for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) { 
    2433  
    2434                         isImposed[noComponent][0] = sortedIsImposed[noComponent][0]; 
    2435                         isImposed[noComponent][1] = sortedIsImposed[noComponent][1]; 
    2436                         isImposed[noComponent][2] = sortedIsImposed[noComponent][2]; 
    2437  
    2438                         outerComp.push_back(sortedOuterCfcStructTable[noComponent]); 
    2439  
    2440                 } 
    2441  
    2442          }  else { topoOrder[0] = 0; } // Added to avoid errors if there is just one vertex  
    2443  
    2444  
    2445         // Set de middle component (2D) array first dimension accordignly to the number of 3D components  
    2446         // --------------------------------------------------------------------------------------------- 
    2447  
    2448         middleComp = new cfcStructTableType*[outerComp.size()]; 
    2449  
    2450         // Set de inner component (1D) array first dimension accordignly to the number of 3D components 
    2451         // --------------------------------------------------------------------------------------------- 
    2452  
    2453         innerComp = new cfcStructTableType***[outerComp.size()]; 
    2454  
    2455         // Set the middle component (2D) array second dimension to 3 (one by first fixed dimension) 
    2456         // ---------------------------------------------------------------------------------------- 
    2457  
    2458         for(int noComp3D = 0; noComp3D <  outerComp.size(); noComp3D++) middleComp[noComp3D]  = new cfcStructTableType[3]; 
    2459  
    2460         // Set the inner component (1D) array second dimension to 3 (one by first fixed dimension) 
    2461         // --------------------------------------------------------------------------------------- 
    2462  
    2463         for(int noComp3D = 0; noComp3D <  outerComp.size(); noComp3D++) innerComp[noComp3D]  = new cfcStructTableType**[3]; 
    2464  
    2465         // For each 3D component  
    2466         // --------------------- 
    2467  
    2468         for(int noComp = 0; noComp <  outerComp.size(); noComp++) { 
    2469  
    2470         // Create a graph that just contain vertices and edges included in the current 3D component (ie extract the current 3D component from the main graph) 
    2471         // -------------------------------------------------------------------------------------------------------------------------------------------------- 
    2472  
    2473                 myGraphType outerGraph; 
    2474  
    2475                 copyGraph(myGraph, outerGraph); 
    2476  
    2477  
    2478                 // Create a graph that just keep the current 3D component egdes and vertices  
    2479                 // ------------------------------------------------------------------------- 
    2480  
    2481                 keepComponent(topoOrder[noComp], outerGraph); 
    2482  
    2483  
    2484                 // Launch the functions for analizing 2D components included inside the current 3D component (see "setMiddle" comments) 
    2485                 // -------------------------------------------------------------------------------------------------------------------- 
    2486  
    2487                 if(boost::num_vertices(outerGraph) > 0) { 
    2488  
    2489                 setMiddle(0, 1, 2, outerGraph, noComp, middleComp, innerComp); 
    2490                 setMiddle(1, 0, 2, outerGraph, noComp, middleComp, innerComp); 
    2491                 setMiddle(2, 0, 1, outerGraph, noComp, middleComp, innerComp); 
    2492  
    2493                 } 
     2399        // ------------------------------------------------------------------------------------------------------------------------- 
     2400 
     2401                int **sortedIsImposed = new int*[nbComponents]; 
     2402 
     2403                for(int i = 0; i < nbComponents; i++) sortedIsImposed[i] = new int[3]; 
     2404 
     2405                vector<cfcStruct> sortedOuterCfcStructTable; 
     2406 
     2407                for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) { 
     2408 
     2409                        sortedOuterCfcStructTable.push_back(outerComp[topoOrder[noComponent]]); 
     2410 
     2411                        sortedIsImposed[noComponent][0] = isImposed[topoOrder[noComponent]][0]; 
     2412                        sortedIsImposed[noComponent][1] = isImposed[topoOrder[noComponent]][1]; 
     2413                        sortedIsImposed[noComponent][2] = isImposed[topoOrder[noComponent]][2]; 
     2414 
     2415                } 
     2416 
     2417                outerComp.clear(); 
     2418 
     2419                for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) { 
     2420 
     2421                        isImposed[noComponent][0] = sortedIsImposed[noComponent][0]; 
     2422                        isImposed[noComponent][1] = sortedIsImposed[noComponent][1]; 
     2423                        isImposed[noComponent][2] = sortedIsImposed[noComponent][2]; 
     2424 
     2425                        outerComp.push_back(sortedOuterCfcStructTable[noComponent]); 
     2426 
     2427                } 
     2428 
     2429         }  else { topoOrder[0] = 0; } // Added to avoid errors if there is just one vertex  
     2430 
     2431 
     2432        // Set de middle component (2D) array first dimension accordignly to the number of 3D components  
     2433        // --------------------------------------------------------------------------------------------- 
     2434 
     2435        middleComp = new cfcStructTableType*[outerComp.size()]; 
     2436 
     2437        // Set de inner component (1D) array first dimension accordignly to the number of 3D components 
     2438        // --------------------------------------------------------------------------------------------- 
     2439 
     2440        innerComp = new cfcStructTableType***[outerComp.size()]; 
     2441 
     2442        // Set the middle component (2D) array second dimension to 3 (one by first fixed dimension) 
     2443        // ---------------------------------------------------------------------------------------- 
     2444 
     2445        for(int noComp3D = 0; noComp3D <  outerComp.size(); noComp3D++) middleComp[noComp3D]  = new cfcStructTableType[3]; 
     2446 
     2447        // Set the inner component (1D) array second dimension to 3 (one by first fixed dimension) 
     2448        // --------------------------------------------------------------------------------------- 
     2449 
     2450        for(int noComp3D = 0; noComp3D <  outerComp.size(); noComp3D++) innerComp[noComp3D]  = new cfcStructTableType**[3]; 
     2451 
     2452        // For each 3D component  
     2453        // --------------------- 
     2454 
     2455        for(int noComp = 0; noComp <  outerComp.size(); noComp++) { 
     2456 
     2457        // Create a graph that just contain vertices and edges included in the current 3D component (ie extract the current 3D component from the main graph) 
     2458        // -------------------------------------------------------------------------------------------------------------------------------------------------- 
     2459 
     2460                myGraphType outerGraph; 
     2461 
     2462                copyGraph(myGraph, outerGraph); 
     2463 
     2464 
     2465                // Create a graph that just keep the current 3D component egdes and vertices  
     2466                // ------------------------------------------------------------------------- 
     2467 
     2468                keepComponent(topoOrder[noComp], outerGraph); 
     2469 
     2470 
     2471                // Launch the functions for analizing 2D components included inside the current 3D component (see "setMiddle" comments) 
     2472                // -------------------------------------------------------------------------------------------------------------------- 
     2473 
     2474                if(boost::num_vertices(outerGraph) > 0) { 
     2475 
     2476                setMiddle(outerComp[noComp].cfcSign[0].first, outerComp[noComp].cfcSign[1].first, outerComp[noComp].cfcSign[2].first, outerGraph, noComp, middleComp, innerComp); 
     2477 
     2478                /**** 
     2479                setMiddle(0, outerComp[noComp].cfcSign[1].first, outerComp[noComp].cfcSign[2].first, outerGraph, noComp, middleComp, innerComp); 
     2480                setMiddle(1, outerComp[noComp].cfcSign[1].first, outerComp[noComp].cfcSign[2].first, outerGraph, noComp, middleComp, innerComp); 
     2481                setMiddle(2, outerComp[noComp].cfcSign[1].first, outerComp[noComp].cfcSign[2].first, outerGraph, noComp, middleComp, innerComp); 
     2482                ****/ 
     2483 
     2484 
     2485                /***** 
     2486                setMiddle(0, 1, 2, outerGraph, noComp, middleComp, innerComp); 
     2487                setMiddle(0, 2, 1, outerGraph, noComp, middleComp, innerComp);  // Bug of repeated axises  
     2488                setMiddle(1, 0, 2, outerGraph, noComp, middleComp, innerComp); 
     2489                setMiddle(1, 2, 0, outerGraph, noComp, middleComp, innerComp);  // Bug of repeated axises 
     2490                setMiddle(2, 0, 1, outerGraph, noComp, middleComp, innerComp); 
     2491                setMiddle(2, 1, 0, outerGraph, noComp, middleComp, innerComp);  // Bug of repeated axises 
     2492                ******/ 
     2493 
     2494 
     2495 
     2496                } 
    24942497 
    24952498        }      // NEXT 3D COMPONENT  
    24962499 
    24972500}; 
    2498  
    24992501 
    25002502 
     
    25672569 
    25682570 
    2569 void Order::showMiddle(int noFixed1, cfcStructTableType& outerComp, middleCompType& middleComp, myGraphType& myGraph) {  
    2570  
    2571                 cout << endl << "showMiddle(" << noFixed1 << ")"; 
    2572  
    2573                 for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 
    2574  
    2575                         for(int noComp2D = 0; noComp2D < middleComp[noComp3D][noFixed1].size(); noComp2D++) { 
    2576  
    2577                                 cout << endl    << "middleComp[" << noComp3D << "][" << noFixed1 << "][" << noComp2D << "].cfcSign[0].first : "  
     2571void Order::showMiddle(int noFixed1, cfcStructTableType& outerComp, middleCompType& middleComp, myGraphType& myGraph) { 
     2572 
     2573                cout << endl << "showMiddle(" << noFixed1 << ")"; 
     2574 
     2575                for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 
     2576 
     2577                        for(int noComp2D = 0; noComp2D < middleComp[noComp3D][noFixed1].size(); noComp2D++) { 
     2578 
     2579                                cout << endl    << "middleComp[" << noComp3D << "][" << noFixed1 << "][" << noComp2D << "].cfcSign[0].first : " 
    25782580                                                <<  middleComp[noComp3D][noFixed1][noComp2D].cfcSign[0].first << " , second : " <<  middleComp[noComp3D][noFixed1][noComp2D].cfcSign[0].second; 
    25792581 
     
    25812583                                                <<  middleComp[noComp3D][noFixed1][noComp2D].cfcSign[1].first << " , second : " <<  middleComp[noComp3D][noFixed1][noComp2D].cfcSign[1].second; 
    25822584 
    2583                                 cout << endl;  
    2584  
    2585                                 for(int noMod = 0; noMod < middleComp[noComp3D][noFixed1][noComp2D].embeddedModuls.size(); noMod++) { 
    2586  
    2587                                         cout << endl << "middleComp[" << noComp3D << "][" << noFixed1 << "][" << noComp2D << "].EmbeddedModuls[" << noMod << "] : " 
     2585                                cout << endl; 
     2586 
     2587                                for(int noMod = 0; noMod < middleComp[noComp3D][noFixed1][noComp2D].embeddedModuls.size(); noMod++) { 
     2588 
     2589                                        cout << endl << "middleComp[" << noComp3D << "][" << noFixed1 << "][" << noComp2D << "].EmbeddedModuls[" << noMod << "] : " 
    25882590                                                     << get(boost::vertex_name_t(), myGraph, middleComp[noComp3D][noFixed1][noComp2D].embeddedModuls[noMod]) << " ==> NoMod : " <<  middleComp[noComp3D][noFixed1][noComp2D].embeddedModuls[noMod]; 
    25892591 
    2590                                 } 
    2591  
    2592                                 cout << endl; 
    2593                         } 
    2594                 }  
    2595         }; 
     2592                                } 
     2593 
     2594                                cout << endl; 
     2595                        } 
     2596                } 
     2597        }; 
    25962598 
    25972599 
     
    26052607 
    26062608int recVal = 0; 
     2609 
     2610// if(boost::num_edges(fixedGraph) == 0) recVal = 3; // ADDED BECAUSE OF A BUG 
    26072611 
    26082612        // For all edges of the graph  
     
    27292733 
    27302734 
    2731 void Order::showGraph( myGraphType& currentGraph, myGraphType& myGraph) { 
     2735 
     2736 
     2737void Order::showGraph(myGraphType& currentGraph) { 
    27322738 
    27332739        cout << endl << "showGraph : " <<  endl << endl; 
     
    27452751                cout    << endl << "Module " << cmptMod << ":\t" 
    27462752 
    2747                         // Name of the modul as it appears in the description file  
    2748                         // ------------------------------------------------------- 
    2749  
    2750                         << "Nom : " << get(boost::vertex_name_t(), myGraph, get(boost::vertex_original_id_t(), currentGraph, *vertexIterOne)) 
    2751  
    27522753                        // Order affected to the modul in the current graph (iformation coming from the topological sort) 
    27532754                        // ---------------------------------------------------------------------------------------------- 
     
    28082809                        <<") ==> " << get(boost::vertex_name_t(), currentGraph,  boost::target(*edgeIterOne, currentGraph)); 
    28092810        cmptArc++; 
    2810           
     2811 
    28112812        } 
    28122813}; 
    28132814 
    2814                       
    2815   
     2815 
     2816 
     2817 
     2818 
    28162819void Order::readParam(int noAxis, int valAxis, int noParam) { 
    28172820 
    2818         ofstream hiddenFile;  
    2819  
    2820         hiddenFile.open(theProject.c_str(), ios::app); 
     2821        ofstream hiddenFile; 
     2822 
     2823        hiddenFile.open(theProject.c_str(), ios::app); 
    28212824 
    28222825 
     
    28542857                                // ------------------------------------------------------------------------------------------------------- 
    28552858 
    2856                                 if(noParam == 3) hiddenFile << endl << endl << "\t\tforder";  
     2859                                if(noParam == 3) hiddenFile << endl << "    forder"; 
    28572860 
    28582861                                // If the current level is the second one, it means the order have to be closed with one tabulation offset 
    28592862                                // ------------------------------------------------------------------------------------------------------- 
    28602863 
    2861                                 if(noParam == 2) hiddenFile << endl << endl << "\tforder"; 
     2864                                if(noParam == 2) hiddenFile << endl << forder"; 
    28622865 
    28632866                                // If the current level is the first one, it means the order have to be closed without tabulation offset  
    28642867                                // ----------------------------------------------------------------------------------------------------- 
    28652868 
    2866                                 if(noParam == 1) hiddenFile << endl << endl << "forder";  
    2867  
    2868                                 this -> orderTokens.push_back("forder"); 
     2869                                if(noParam == 1) hiddenFile << endl << "forder"; 
     2870 
     2871                                this -> orderTokens.push_back("forder"); 
    28692872 
    28702873                        break; 
     
    28782881                                // --------------------------------------------------------------------------------------------------------------------------------------- 
    28792882 
    2880                                 if(noParam == 2) hiddenFile <<  endl << endl << "\t\tforder" << endl << "\tforder";   
    2881                                                  
     2883                                if(noParam == 2) hiddenFile <<  endl << "    forder" << endl << "  forder"; 
     2884 
    28822885 
    28832886                                // If the current parameter is the first one, the order statement  have to be closed with one tabulation offset then no offset 
    28842887                                // --------------------------------------------------------------------------------------------------------------------------- 
    28852888 
    2886                                 if(noParam == 1) hiddenFile << endl << endl << "\tforder" << endl << "forder";  
    2887  
    2888                                 this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); 
     2889                                if(noParam == 1) hiddenFile << endl << "  forder" << endl << "forder"; 
     2890 
     2891                                this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); 
    28892892 
    28902893                        break; 
     
    28982901                                // ---------------------------------------------------------------------------------------------------------------------------------------- 
    28992902 
    2900                                 hiddenFile << endl << endl << "\t\tforder" << endl << endl << "\tforder" << endl << "forder"; 
    2901  
    2902                                 this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); 
     2903                                hiddenFile << endl << "    forder" << endl << "  forder" << endl << "forder"; 
     2904 
     2905                                this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); 
    29032906 
    29042907                        break; 
     
    29152918                        // ------------------------------------------------------- 
    29162919 
    2917                         case 1: hiddenFile << endl << endl; break;  
     2920                        case 1: hiddenFile << endl; break; 
    29182921 
    29192922                        // If the parameter is the second, then one offset is needed 
    29202923                        // --------------------------------------------------------- 
    29212924 
    2922                         case 2: hiddenFile << endl << endl << "\t"; break;  
     2925                        case 2: hiddenFile << endl << "  "; break; 
    29232926 
    29242927                        // If the parameter is the third, then two offsets are needed 
    29252928                        // ---------------------------------------------------------- 
    29262929 
    2927                         case 3: hiddenFile << endl << endl << "\t\t"; break; 
     2930                        case 3: hiddenFile << endl << "    "; break; 
    29282931                        } 
    29292932 
     
    29312934        // ------------------------------------------------------- 
    29322935 
    2933         stringstream valParam;   
    2934          
    2935         this -> orderTokens.push_back("order"); 
     2936        stringstream valParam; 
     2937 
     2938        this -> orderTokens.push_back("order"); 
    29362939 
    29372940        switch(valAxis) { 
     
    29402943                        // ------------------------------------------------------------------------------------------------------------ 
    29412944 
    2942                         case  0: hiddenFile << "order " << "\t" << "Y." << noAxis + 1; valParam << "YA"; break; 
     2945                        case  0: hiddenFile << "order " << "  " << "Y." << noAxis + 1; valParam << "YA"; break; 
    29432946 
    29442947                        // If the axis value is set to 3 (no edges), then the dimension can be crossed both way (free) 
    29452948                        // ------------------------------------------------------------------------------------------- 
    29462949 
    2947                         case  3: hiddenFile << "order " << "\t" << "Y." << noAxis + 1; valParam << "YA"; break; 
     2950                        case  3: hiddenFile << "order " << "  " << "Y." << noAxis + 1; valParam << "YA"; break; 
    29482951 
    29492952                        // If the axis value is set to -1, then the dimension must be crossed increasingly  
    29502953                        // ------------------------------------------------------------------------------- 
    29512954 
    2952                         case -1: hiddenFile << "order " << "\t" << "YA" << noAxis + 1; valParam << "YA"; break; 
     2955                        case -1: hiddenFile << "order " << "  " << "YA" << noAxis + 1; valParam << "YA"; break; 
    29532956 
    29542957                        // If the axis value is set to +1, then the dimension must be crossed decreasingly 
    29552958                        // ------------------------------------------------------------------------------- 
    29562959 
    2957                         case  1: hiddenFile << "order " << "\t" << "YB" << noAxis + 1; valParam << "YB"; break; 
     2960                        case  1: hiddenFile << "order " << "  " << "YB" << noAxis + 1; valParam << "YB"; break; 
    29582961 
    29592962                        // If the axis value is set to 2 (no common value), then the dimension can be crossed both way (free) 
    29602963                        // -------------------------------------------------------------------------------------------------- 
    29612964 
    2962                         case  2: hiddenFile << "order " << "\t" << "Y." << noAxis + 1; valParam << "YA"; break; // A VOIR !!!! 
     2965                        case  2: hiddenFile << "order " << "  " << "Y." << noAxis + 1; valParam << "YA"; break; // A VOIR !!!! 
    29632966                        } 
    29642967 
    2965                         valParam << noAxis + 1;  
    2966  
    2967                         this -> orderTokens.push_back(valParam.str()); 
     2968                        valParam << noAxis + 1; 
     2969 
     2970                        this -> orderTokens.push_back(valParam.str()); 
    29682971 
    29692972} 
     
    29772980        // --------------------------------------------------------------------------------------------------------------------------------- 
    29782981 
    2979         if(lastParam == 3) {    hiddenFile  << endl << endl << "\t\tforder" << endl << endl << "\tforder" << endl << "forder" << endl << endl;  
    2980  
    2981                                 this -> orderTokens.push_back("forder");  this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); }                     
    2982                  
     2982        if(lastParam == 3) {    hiddenFile  << endl << "    forder" << endl << "  forder" << endl << "forder" << endl; 
     2983 
     2984                                this -> orderTokens.push_back("forder");  this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); } 
     2985 
    29832986 
    29842987        // If the last parameter was the second in the order statement, then two parameters have to be closed (one for each open parameter) 
    29852988        // -------------------------------------------------------------------------------------------------------------------------------- 
    29862989 
    2987         if(lastParam == 2) {    hiddenFile << endl << endl << "\tforder" << endl << "forder" << endl << endl; 
    2988          
    2989                                 this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); } 
    2990          
     2990        if(lastParam == 2) {    hiddenFile << endl << "  forder" << endl << "forder" << endl; 
     2991 
     2992                                this -> orderTokens.push_back("forder"); this -> orderTokens.push_back("forder"); } 
     2993 
    29912994 
    29922995        // If the last parameter was the first in the order statement, then one parameter have to be closed  
    29932996        // ------------------------------------------------------------------------------------------------ 
    29942997 
    2995         if(lastParam == 1) { hiddenFile << endl << endl << "forder" << endl << endl; this -> orderTokens.push_back("forder"); }  
    2996  
    2997         // Reset the lastParam static value to avoid a closing order at the beginning of the next order statement 
    2998         // ------------------------------------------------------------------------------------------------------- 
    2999  
    3000         lastParam = 0;  
     2998        if(lastParam == 1) { hiddenFile << endl << "forder" << endl; this -> orderTokens.push_back("forder"); } 
     2999 
     3000        // Reset the lastParam static value to avoid a closing order at the beginning of the next order statement 
     3001        // ------------------------------------------------------------------------------------------------------- 
     3002 
     3003        lastParam = 0; 
    30013004} 
    30023005 
     
    30083011void Order::setInner(int noComp3D, int noFixed1, int noComp2D, int noFixed2, int freeDim, myGraphType& upperGraph, innerCompType& innerComp) { 
    30093012 
    3010         myGraphType currentGraph; 
     3013        myGraphType currentGraph; 
    30113014 
    30123015        copyGraph(upperGraph, currentGraph); 
     
    30153018 
    30163019        // ETAPE 1 DE LA PROCEDURE A UNE DIMENSION  
    3017         // --------------------------------------- 
     3020        // --------------------------------------- 
    30183021 
    30193022        // Create data structures used by the component search algorithm 
    3020         // ------------------------------------------------------------- 
     3023        // ------------------------------------------------------------- 
    30213024 
    30223025        std::vector<int> fixedComponentsList(boost::num_vertices(currentGraph)); 
     
    30253028 
    30263029        // Perform the 1D component search  
    3027         // -------------------------------- 
     3030        // -------------------------------- 
    30283031 
    30293032        boost::strong_components(currentGraph, &fixedComponentsList[0], boost::root_map(&fixedVerticesDiscoverList[0])); 
    30303033 
    3031         // Resetting all vertices'affected component  
    3032         // ----------------------------------------- 
     3034        // Resetting all vertices'affected component  
     3035        // ----------------------------------------- 
    30333036 
    30343037        for(tie(vertexIterOne, vertexIterTwo) = vertices(currentGraph); vertexIterOne != vertexIterTwo; ++vertexIterOne) { 
    3035          
    3036         put(get(boost::vertex_affected_comp_t(), currentGraph), *vertexIterOne, -1); 
    3037          
    3038         } 
     3038 
     3039        put(get(boost::vertex_affected_comp_t(), currentGraph), *vertexIterOne, -1); 
     3040 
     3041        } 
    30393042 
    30403043        // Populate the vertices property of the graph (set for each vertex its component Id)  
    3041         // ---------------------------------------------------------------------------------- 
     3044        // ---------------------------------------------------------------------------------- 
    30423045 
    30433046        for(int i = 0; i < fixedComponentsList.size(); i++) put(get(boost::vertex_affected_comp_t(), currentGraph), i, fixedComponentsList[i]); 
    30443047 
    30453048        // Get the number of 1D components detected  
    3046         // ---------------------------------------- 
     3049        // ---------------------------------------- 
    30473050 
    30483051        int nbFixedComponents = *max_element(fixedComponentsList.begin(), fixedComponentsList.end()) + 1; 
     
    30503053 
    30513054        // ETAPE 5.1 DE LA PROCEDURE A UNE DIMENSION  
    3052         // ----------------------------------------- 
     3055        // ----------------------------------------- 
    30533056 
    30543057        // update the innerComp array to allow this structure to register informations on all the 1D components detected for the dimension  
    3055         // ------------------------------------------------------------------------------------------------------------------------------- 
    3056  
    3057         innerComp[noComp3D][noFixed1][noComp2D][noFixed2].resize(nbFixedComponents); 
    3058  
    3059         // Array that will register imposed path on the  
    3060         // -------------------------------------------- 
    3061  
    3062         int *imposedPath = new int[nbFixedComponents]; 
     3058        // ------------------------------------------------------------------------------------------------------------------------------- 
     3059 
     3060        innerComp[noComp3D][noFixed1][noComp2D][noFixed2].resize(nbFixedComponents); 
     3061 
     3062        // Array that will register imposed path on the  
     3063        // -------------------------------------------- 
     3064 
     3065        int *imposedPath = new int[nbFixedComponents]; 
     3066 
     3067        for(int noComp1D = 0; noComp1D <nbFixedComponents; noComp1D++) imposedPath[noComp1D] = 0; 
     3068 
     3069 
     3070        // reset all the structure attributes  
     3071        // ---------------------------------- 
     3072 
     3073        for(int noComp1D = 0; noComp1D < innerComp[noComp3D][noFixed1][noComp2D][noFixed2].size(); noComp1D++) { 
     3074 
     3075                innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign.resize(1); 
     3076                innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = 0; 
     3077                innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.resize(0); 
     3078        } 
     3079 
     3080 
     3081        // For each component, insert in the inner struct table element the embebbed moduls  
     3082        // -------------------------------------------------------------------------------- 
     3083 
     3084        for(int i = 0; i < fixedComponentsList.size(); i++) { 
     3085 
     3086        innerComp[noComp3D][noFixed1][noComp2D][noFixed2][fixedComponentsList[i]].embeddedModuls.push_back(boost::get(boost::vertex_original_id_t(), currentGraph, i)); 
     3087 
     3088        } 
     3089 
     3090 
     3091        // ETAPE 5.2 DE LA PROCEDURE A UNE DIMENSION 
     3092        // -----------------------------------------   
     3093 
     3094        // ETAPE 2 DE LA PROCEDURE A UNE DIMENSION   
     3095        // --------------------------------------- 
     3096 
     3097        // Get the common size of the component for the current dimension then store the information on the structure 
     3098        // ---------------------------------------------------------------------------------------------------------- 
     3099 
     3100        for(int noComp1D = 0; noComp1D < nbFixedComponents; noComp1D++) { 
     3101 
     3102                imposedPath[noComp1D] = getCommonFixedSign(freeDim, noComp1D, currentGraph); 
     3103 
     3104                innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].first = 0; 
     3105 
     3106                innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].first  = freeDim; 
     3107 
     3108        // *** SUPER GROSSE MODIF  innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = getCommonSignInner(noFixed2, freeDim, currentGraph); 
     3109 
     3110                innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = getCommonSign(freeDim, noComp1D, currentGraph); 
     3111 
     3112                /* LA VALEUR NE DOIT PAS POUVOIR ETRE 2, ET SI ELLE EST ZERO QUEL PROBLEME ???  
     3113                if(innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second == 0 ||  
     3114                   innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second == 2) { 
     3115                innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = getCommonFixedSign(freeDim, noComp1D, currentGraph); 
     3116                        } 
     3117                */ 
     3118 
     3119        } 
     3120 
     3121        // ETAPE 3 DE LA PROCEDURE A UNE DIMENSION   
     3122        // --------------------------------------- 
     3123 
     3124        fixGraph(currentGraph, freeDim); 
     3125 
     3126        // ETAPE 4 DE LA PROCEDURE A UNE DIMENSION   
     3127        // ---------------------------------------  
     3128 
     3129        // Perform a topological sort on the graph  
     3130 
     3131        std::deque<int> topoOrder; 
     3132 
     3133        boost::topological_sort(currentGraph, std::front_inserter(topoOrder), boost::vertex_index_map(boost::identity_property_map())); 
     3134 
     3135        for(int i = 0; i < topoOrder.size(); i++) put(get(boost::vertex_topo_order_t(), currentGraph), topoOrder[i], i); 
     3136 
     3137        // ETAPE 5.2 DE LA PROCEDURE A UNE DIMENSION  
     3138        // ----------------------------------------- 
     3139 
     3140        // Sort the moduls inside the components (internal sort)   
     3141        // ----------------------------------------------------- 
     3142 
     3143        for(int noComp1D = 0; noComp1D < innerComp[noComp3D][noFixed1][noComp2D][noFixed2].size(); noComp1D++) { 
     3144 
     3145                for(int noMod = 0; noMod < innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.size(); noMod++) { 
     3146 
     3147                        for(int noMod2 = noMod + 1; noMod2 < innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.size(); noMod2++) { 
     3148 
     3149                                if(get(boost::vertex_topo_order_t(), currentGraph, innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod])  > 
     3150                                   get(boost::vertex_topo_order_t(), currentGraph , innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod2])) { 
     3151 
     3152                                        int recMod = innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod]; 
     3153 
     3154                                        innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod] = innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod2]; 
     3155 
     3156                                        innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod2] = recMod; 
     3157                                } 
     3158                        } 
     3159                } 
     3160        } 
     3161 
    30633162         
    3064         for(int noComp1D = 0; noComp1D <nbFixedComponents; noComp1D++) imposedPath[noComp1D] = 0; 
    3065  
    3066  
    3067         // reset all the structure attributes  
    3068         // ---------------------------------- 
    3069  
    3070         for(int noComp1D = 0; noComp1D < innerComp[noComp3D][noFixed1][noComp2D][noFixed2].size(); noComp1D++) { 
    3071  
    3072                 innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign.resize(1); 
    3073                 innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = 0; 
    3074                 innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.resize(0); 
     3163 
     3164        // ETAPE 5.3 DE LA PROCEDURE A UNE DIMENSION  
     3165        // -----------------------------------------  
     3166 
     3167        // Create a reduced graph whose vertices are the components of the current graph 
     3168        // ----------------------------------------------------------------------------- 
     3169 
     3170        myGraphType cfcGraph; 
     3171 
     3172        reduceGraph(currentGraph, cfcGraph, nbFixedComponents); 
     3173 
     3174        if(boost::num_vertices(cfcGraph) > 1) { 
     3175 
     3176        std::deque<int> reducedTopoOrder; 
     3177 
     3178        // Perform a topological sort on the reduced graph 
     3179        // ----------------------------------------------- 
     3180 
     3181        boost::topological_sort(cfcGraph, std::front_inserter(reducedTopoOrder), boost::vertex_index_map(boost::identity_property_map())); 
     3182 
     3183        // Sort the inner structure table elements accordignly to the sorting performed on the reduced graph  
     3184        // ------------------------------------------------------------------------------------------------- 
     3185 
     3186        vector<cfcStruct> sortedCfcStructTable; 
     3187 
     3188        for(int noComponent = 0; noComponent < reducedTopoOrder.size(); noComponent++) sortedCfcStructTable.push_back(innerComp[noComp3D][noFixed1][noComp2D][noFixed2][reducedTopoOrder[noComponent]]); 
     3189 
     3190        innerComp[noComp3D][noFixed1][noComp2D][noFixed2].clear(); 
     3191 
     3192        for(int noComponent = 0; noComponent < reducedTopoOrder.size(); noComponent++) innerComp[noComp3D][noFixed1][noComp2D][noFixed2].push_back(sortedCfcStructTable[noComponent]); 
     3193 
    30753194        } 
    3076  
    3077  
    3078         // For each component, insert in the inner struct table element the embebbed moduls  
    3079         // -------------------------------------------------------------------------------- 
    3080  
    3081         for(int i = 0; i < fixedComponentsList.size(); i++) { 
    3082  
    3083         innerComp[noComp3D][noFixed1][noComp2D][noFixed2][fixedComponentsList[i]].embeddedModuls.push_back(boost::get(boost::vertex_original_id_t(), currentGraph, i)); 
    3084  
    3085         } 
    3086          
    3087  
    3088         // ETAPE 5.2 DE LA PROCEDURE A UNE DIMENSION 
    3089         // -----------------------------------------   
    3090  
    3091         // ETAPE 2 DE LA PROCEDURE A UNE DIMENSION   
    3092         // --------------------------------------- 
    3093  
    3094         // Get the common size of the component for the current dimension then store the information on the structure 
    3095         // ---------------------------------------------------------------------------------------------------------- 
    3096  
    3097         for(int noComp1D = 0; noComp1D < nbFixedComponents; noComp1D++) { 
    3098  
    3099                 imposedPath[noComp1D] = getCommonFixedSign(freeDim, noComp1D, currentGraph); 
    3100  
    3101                 innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].first = 0; 
    3102  
    3103                 innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].first  = freeDim; 
    3104  
    3105         // *** SUPER GROSSE MODIF  innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = getCommonSignInner(noFixed2, freeDim, currentGraph); 
    3106          
    3107                 innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = getCommonSign(freeDim, noComp1D, currentGraph); 
    3108  
    3109                 /* LA VALEUR NE DOIT PAS POUVOIR ETRE 2, ET SI ELLE EST ZERO QUEL PROBLEME ???  
    3110                 if(innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second == 0 ||  
    3111                    innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second == 2) { 
    3112                 innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].cfcSign[0].second = getCommonFixedSign(freeDim, noComp1D, currentGraph); 
    3113                         } 
    3114                 */ 
    3115  
    3116         } 
    3117  
    3118         // ETAPE 3 DE LA PROCEDURE A UNE DIMENSION   
    3119         // --------------------------------------- 
    3120  
    3121         fixGraph(currentGraph, freeDim); 
    3122  
    3123         // ETAPE 4 DE LA PROCEDURE A UNE DIMENSION   
    3124         // ---------------------------------------  
    3125  
    3126         // Perform a topological sort on the graph  
    3127  
    3128         std::deque<int> topoOrder; 
    3129  
    3130         boost::topological_sort(currentGraph, std::front_inserter(topoOrder), boost::vertex_index_map(boost::identity_property_map())); 
    3131  
    3132         for(int i = 0; i < topoOrder.size(); i++) put(get(boost::vertex_topo_order_t(), currentGraph), topoOrder[i], i); 
    3133  
    3134         // ETAPE 5.2 DE LA PROCEDURE A UNE DIMENSION  
    3135         // ----------------------------------------- 
    3136  
    3137         // Sort the moduls inside the components (internal sort)   
    3138         // ----------------------------------------------------- 
    3139  
    3140         for(int noComp1D = 0; noComp1D < innerComp[noComp3D][noFixed1][noComp2D][noFixed2].size(); noComp1D++) { 
    3141  
    3142                 for(int noMod = 0; noMod < innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.size(); noMod++) { 
    3143  
    3144                         for(int noMod2 = noMod + 1; noMod2 < innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls.size(); noMod2++) {  
    3145  
    3146                                 if(get(boost::vertex_topo_order_t(), currentGraph, innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod])  > 
    3147                                    get(boost::vertex_topo_order_t(), currentGraph , innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod2])) { 
    3148  
    3149                                         int recMod = innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod]; 
    3150  
    3151                                         innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod] = innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod2]; 
    3152                  
    3153                                         innerComp[noComp3D][noFixed1][noComp2D][noFixed2][noComp1D].embeddedModuls[noMod2] = recMod; 
    3154                                 } 
    3155                         } 
    3156                 } 
    3157         } 
    3158  
    3159         // ETAPE 5.3 DE LA PROCEDURE A UNE DIMENSION  
    3160         // -----------------------------------------  
    3161  
    3162         // Create a reduced graph whose vertices are the components of the current graph 
    3163         // ----------------------------------------------------------------------------- 
    3164  
    3165         myGraphType cfcGraph; 
    3166  
    3167         reduceGraph(currentGraph, cfcGraph, nbFixedComponents); 
    3168  
    3169         if(boost::num_vertices(cfcGraph) > 1) { 
    3170  
    3171         std::deque<int> reducedTopoOrder; 
    3172  
    3173         // Perform a topological sort on the reduced graph 
    3174         // ----------------------------------------------- 
    3175  
    3176         boost::topological_sort(cfcGraph, std::front_inserter(reducedTopoOrder), boost::vertex_index_map(boost::identity_property_map())); 
    3177  
    3178         // Sort the inner structure table elements accordignly to the sorting performed on the reduced graph  
    3179         // ------------------------------------------------------------------------------------------------- 
    3180  
    3181         vector<cfcStruct> sortedCfcStructTable; 
    3182  
    3183         for(int noComponent = 0; noComponent < reducedTopoOrder.size(); noComponent++) sortedCfcStructTable.push_back(innerComp[noComp3D][noFixed1][noComp2D][noFixed2][reducedTopoOrder[noComponent]]); 
    3184  
    3185         innerComp[noComp3D][noFixed1][noComp2D][noFixed2].clear(); 
    3186  
    3187         for(int noComponent = 0; noComponent < reducedTopoOrder.size(); noComponent++) innerComp[noComp3D][noFixed1][noComp2D][noFixed2].push_back(sortedCfcStructTable[noComponent]); 
    3188  
    3189         } 
    31903195 
    31913196}; 
     
    32563261 
    32573262 
    3258         // Create a graph that only keep zero valuated edges for the 3D fixed dim, this graph will be the 2D graph 
    3259         // ------------------------------------------------------------------------------------------------------- 
     3263        // Create a graph that only keep zero valuated edges for the 3D fixed dim, this graph will be the 2D graph 
     3264        // ------------------------------------------------------------------------------------------------------- 
    32603265 
    32613266        myGraphType fixedGraph; 
    32623267 
    3263         copyGraph(currentGraph, fixedGraph);  
    3264  
    3265         fixGraph(fixedGraph, fixedDim); 
     3268        copyGraph(currentGraph, fixedGraph); 
     3269 
     3270        fixGraph(fixedGraph, fixedDim); 
    32663271 
    32673272        // ETAPE 3 DE LA PROCEDURE A DEUX DIMENSION  
    3268         // ---------------------------------------- 
    3269  
    3270         // Create data structures used by boost to perform the strong component search  
    3271         // --------------------------------------------------------------------------- 
     3273        // ---------------------------------------- 
     3274 
     3275        // Create data structures used by boost to perform the strong component search  
     3276        // --------------------------------------------------------------------------- 
    32723277 
    32733278        std::vector<int> middleComponentsList(boost::num_vertices(fixedGraph)); 
    32743279 
    32753280        std::vector<vertexDescriptor> verticesDiscoverList(boost::num_vertices(fixedGraph)); 
    3276          
    3277         // Resetting all vertices'affected component of the 2D graph  
    3278         // --------------------------------------------------------- 
    3279  
    3280         for(tie(vertexIterOne, vertexIterTwo) = vertices(fixedGraph); vertexIterOne != vertexIterTwo; ++vertexIterOne) put(get(boost::vertex_affected_comp_t(), fixedGraph), *vertexIterOne, -1); 
    3281  
    3282         // Perform a strong components search on the 2D graph  
    3283         // -------------------------------------------------- 
    3284  
    3285         boost::strong_components(fixedGraph, &middleComponentsList[0], boost::root_map(&verticesDiscoverList[0])); 
    3286  
    3287         // Update vertices properties of the 2D graph : set a component Id on each vertex 
    3288         // ------------------------------------------------------------------------------ 
    3289  
    3290         for(int i = 0; i < middleComponentsList.size(); i++) put(get(boost::vertex_affected_comp_t(), fixedGraph), i, middleComponentsList[i]); 
    3291  
    3292         // Setting the number of components that have been detected 
    3293         // -------------------------------------------------------- 
    3294  
    3295         int nbComponents = *max_element(middleComponentsList.begin(), middleComponentsList.end()) + 1; 
    3296  
    3297         // Setting the third dimension size of innerComp array 
    3298         // --------------------------------------------------- 
    3299  
    3300         innerComp[noComp][fixedDim] = new cfcStructTableType*[nbComponents];  
    3301  
    3302         // Setting the fourth dimension size of the innerComp array 
    3303         // -------------------------------------------------------- 
    3304  
    3305         for(int noCompD2 = 0; noCompD2 < nbComponents; noCompD2++) innerComp[noComp][fixedDim][noCompD2] = new cfcStructTableType[3]; 
    3306  
    3307         // ETAPE 5 DE LA PROCEDURE A DEUX DIMENSION  
    3308         // ---------------------------------------- 
    3309  
    3310         // Resize the middleComp array with the size of 2D components that have been detected 
    3311         // ---------------------------------------------------------------------------------- 
    3312  
    3313         middleComp[noComp][fixedDim].resize(nbComponents); 
    3314  
    3315         // Set up the array that will be used to register the informations about imposed values for the axis 
    3316         // ------------------------------------------------------------------------------------------------- 
    3317  
    3318         int ** isImposed2D = new int*[nbComponents]; 
    3319  
    3320         for(int i = 0; i < nbComponents; i++) isImposed2D[i] = new int[2]; 
    3321  
    3322         // For each component, set the sign for the first and second dimensions then register this sign in the cfcSign attribute 
    3323         // --------------------------------------------------------------------------------------------------------------------- 
    3324  
    3325         for(int noComponent = 0; noComponent < nbComponents; noComponent++) { 
    3326  
    3327                 // Setting inial imposed values (0 mean no imposed) 
    3328                 // ------------------------------------------------ 
    3329  
    3330                 isImposed2D[noComponent][0] = 0; 
    3331                 isImposed2D[noComponent][1] = 0; 
    3332  
    3333                 middleComp[noComp][fixedDim][noComponent].cfcSign.resize(2); 
    3334  
    3335                 middleComp[noComp][fixedDim][noComponent].cfcSign[0].first = dimOne; 
    3336                 middleComp[noComp][fixedDim][noComponent].cfcSign[1].first = dimTwo; 
    3337  
    3338                 middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = 0; 
    3339                 middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = 0; 
    3340  
    3341                 middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = getCommonSign(dimOne, noComponent, fixedGraph);  
    3342                 middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = getCommonSign(dimTwo, noComponent, fixedGraph); 
    3343  
    3344                 int sign0 = middleComp[noComp][fixedDim][noComponent].cfcSign[0].second; 
    3345                 int sign1 = middleComp[noComp][fixedDim][noComponent].cfcSign[1].second; 
    3346  
    3347                 int axis0 = dimOne; 
    3348                 int axis1 = dimTwo;  
    3349  
    3350                 // If there is just one vertex in the component without reflexive edge 
    3351                 // ------------------------------------------------------------------- 
    3352  
    3353                 bool isConnected = true; 
     3281 
     3282        // Resetting all vertices'affected component of the 2D graph  
     3283        // --------------------------------------------------------- 
     3284 
     3285        for(tie(vertexIterOne, vertexIterTwo) = vertices(fixedGraph); vertexIterOne != vertexIterTwo; ++vertexIterOne) put(get(boost::vertex_affected_comp_t(), fixedGraph), *vertexIterOne, -1); 
     3286 
     3287        // Perform a strong components search on the 2D graph  
     3288        // -------------------------------------------------- 
     3289 
     3290        boost::strong_components(fixedGraph, &middleComponentsList[0], boost::root_map(&verticesDiscoverList[0])); 
     3291 
     3292        // Update vertices properties of the 2D graph : set a component Id on each vertex 
     3293        // ------------------------------------------------------------------------------ 
     3294 
     3295        for(int i = 0; i < middleComponentsList.size(); i++) put(get(boost::vertex_affected_comp_t(), fixedGraph), i, middleComponentsList[i]); 
     3296 
     3297        // Setting the number of components that have been detected 
     3298        // -------------------------------------------------------- 
     3299 
     3300        int nbComponents = *max_element(middleComponentsList.begin(), middleComponentsList.end()) + 1; 
     3301 
     3302        // Setting the third dimension size of innerComp array 
     3303        // --------------------------------------------------- 
     3304 
     3305        innerComp[noComp][fixedDim] = new cfcStructTableType*[nbComponents]; 
     3306 
     3307        // Setting the fourth dimension size of the innerComp array 
     3308        // -------------------------------------------------------- 
     3309 
     3310        for(int noCompD2 = 0; noCompD2 < nbComponents; noCompD2++) innerComp[noComp][fixedDim][noCompD2] = new cfcStructTableType[3]; 
     3311 
     3312        // ETAPE 5 DE LA PROCEDURE A DEUX DIMENSION  
     3313        // ---------------------------------------- 
     3314 
     3315        // Resize the middleComp array with the size of 2D components that have been detected 
     3316        // ---------------------------------------------------------------------------------- 
     3317 
     3318        middleComp[noComp][fixedDim].resize(nbComponents); 
     3319 
     3320        // Set up the array that will be used to register the informations about imposed values for the axis 
     3321        // ------------------------------------------------------------------------------------------------- 
     3322 
     3323        int ** isImposed2D = new int*[nbComponents]; 
     3324 
     3325        for(int i = 0; i < nbComponents; i++) isImposed2D[i] = new int[2]; 
     3326 
     3327        // For each component, set the sign for the first and second dimensions then register this sign in the cfcSign attribute 
     3328        // --------------------------------------------------------------------------------------------------------------------- 
     3329 
     3330        for(int noComponent = 0; noComponent < nbComponents; noComponent++) { 
     3331 
     3332                // Setting inial imposed values (0 mean no imposed) 
     3333                // ------------------------------------------------ 
     3334 
     3335                isImposed2D[noComponent][0] = 0; 
     3336                isImposed2D[noComponent][1] = 0; 
     3337 
     3338                middleComp[noComp][fixedDim][noComponent].cfcSign.resize(2); 
     3339 
     3340                middleComp[noComp][fixedDim][noComponent].cfcSign[0].first = dimOne; 
     3341                middleComp[noComp][fixedDim][noComponent].cfcSign[1].first = dimTwo; 
     3342 
     3343                middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = 0; 
     3344                middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = 0; 
     3345 
     3346                middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = getCommonSign(dimOne, noComponent, fixedGraph); 
     3347                middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = getCommonSign(dimTwo, noComponent, fixedGraph); 
     3348 
     3349                int sign0 = middleComp[noComp][fixedDim][noComponent].cfcSign[0].second; 
     3350                int sign1 = middleComp[noComp][fixedDim][noComponent].cfcSign[1].second; 
     3351 
     3352                int axis0 = dimOne; 
     3353                int axis1 = dimTwo; 
     3354 
     3355                // If there is just one vertex in the component without reflexive edge 
     3356                // ------------------------------------------------------------------- 
     3357 
     3358                bool isConnected = true; 
    33543359 
    33553360                if(sign0 == 3 && sign1 == 3) { 
     
    33613366                } 
    33623367 
    3363                 if(isConnected) {  
    3364  
    3365                         // Detecting all possible axis combinations  
    3366                         // ---------------------------------------- 
    3367  
    3368                         int noConf = -1; 
    3369  
    3370                         if(sign0 != 2 && sign1 != 2)  noConf = 0;       // axis0 -> axis1 (axis1 free) 
    3371                         if(sign0 != 2 && sign1 == 2)  noConf = 1;       // axis0 -> axis1  
    3372                         if(sign0 == 2 && sign1 == 2)  noConf = 2;       // axis0 -> axis1 
    3373                         if(sign0 == 2 && sign1 != 2)  noConf = 3;       // axis1 -> axis0  
    3374  
    3375                         // Looking at combinations to set imposed values for the second axis  
    3376                         // ----------------------------------------------------------------- 
    3377  
    3378                         if(noConf < 3) isImposed2D[noComponent][1] = getImposed(axis1, noComponent, fixedGraph); 
    3379  
    3380                         if(noConf == 3) isImposed2D[noComponent][1] = getImposed(axis0, noComponent, fixedGraph); 
    3381  
    3382                         // Sort the axis then set their values accordignly to the combination available for the current 2D component 
    3383                         // --------------------------------------------------------------------------------------------------------- 
    3384  
    3385                         if(noConf == 0) {  
    3386  
    3387                                 middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = 0; 
    3388  
    3389                                 if(isImposed2D[noComponent][0] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = isImposed2D[noComponent][0]; 
    3390                                 if(isImposed2D[noComponent][1] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][1];  
    3391                         } 
    3392  
    3393                         if(noConf > 0 && noConf < 3) { 
    3394  
    3395                                 if(isImposed2D[noComponent][0] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = isImposed2D[noComponent][0]; 
    3396                                 if(isImposed2D[noComponent][1] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][1]; 
    3397                         } 
    3398  
    3399                         if(noConf == 3) {  
    3400          
    3401                                 int tmpVal = middleComp[noComp][fixedDim][noComponent].cfcSign[0].second; 
    3402                                 middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = middleComp[noComp][fixedDim][noComponent].cfcSign[1].second; 
    3403                                 middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = tmpVal; 
    3404                                 middleComp[noComp][fixedDim][noComponent].cfcSign[0].first = axis1; 
    3405                                 middleComp[noComp][fixedDim][noComponent].cfcSign[1].first = axis0; 
    3406  
    3407                              // if(isImposed2D[noComponent][0] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][0];  
    3408                                 if(isImposed2D[noComponent][1] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][1];  
    3409                         } 
    3410                 }  
    3411  
    3412         // If the last axis value is not defined  
    3413  
    3414          if(middleComp[noComp][fixedDim][noComponent].cfcSign[1].second == 2) { 
    3415  
    3416                 // If no decomposition is not needed, then set the value to zero to avoid decomposition  
    3417          
    3418                 if(!isToDecompose(middleComp[noComp][fixedDim][noComponent].cfcSign[1].first, fixedGraph)) {  
    3419  
    3420                         middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = 0;  
    3421  
    3422                         } 
    3423                 } 
    3424         } 
    3425  
    3426  
    3427         // ETAPE 6 DE LA PROCEDURE A DEUX DIMENSION  
    3428         // ------------------------------------- 
    3429  
    3430         myGraphType cfcGraph; 
    3431  
    3432         reduceGraph(fixedGraph, cfcGraph, nbComponents); 
    3433  
    3434         // ETAPE 7 DE LA PROCEDURE A DEUX DIMENSION  
    3435         // ---------------------------------------- 
    3436  
    3437         std::deque<int> topoOrder; 
    3438  
    3439         if(boost::num_vertices(cfcGraph) > 1) { 
    3440  
    3441                 // Perform a topological sort on the graph whose vertices are the components (reduced graph) 
    3442                 // ----------------------------------------------------------------------------------------- 
    3443  
    3444                 boost::topological_sort(cfcGraph, std::front_inserter(topoOrder), boost::vertex_index_map(boost::identity_property_map())); 
    3445  
    3446                 // ETAPE 8 DE LA PROCEDURE A DEUX DIMENSION  
    3447                 // ---------------------------------------- 
    3448  
    3449                 // Sort the middle structure table elements (2D graph components) accordignly to the sorting performed on the reduced graph  
    3450                 // ------------------------------------------------------------------------------------------------------------------------ 
    3451  
    3452                 vector<cfcStruct> sortedCfcStructTable; 
    3453  
    3454                 for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) sortedCfcStructTable.push_back(middleComp[noComp][fixedDim][topoOrder[noComponent]]); 
    3455  
    3456                 middleComp[noComp][fixedDim].clear(); 
    3457  
    3458                 for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) middleComp[noComp][fixedDim].push_back(sortedCfcStructTable[noComponent]); 
    3459  
    3460         } 
    3461  
    3462         else { topoOrder[0] = 0; } 
    3463  
    3464  
    3465         // ETAPE 9 DE LA PROCEDURE A DEUX DIMENSION  
    3466         // ---------------------------------------- 
    3467  
    3468         // Create a graph that just keep the current 2D component egdes and vertices  
    3469         // ------------------------------------------------------------------------- 
    3470  
    3471         for(int noComp2D = 0; noComp2D < nbComponents; noComp2D++) {  
    3472  
    3473                 myGraphType outputGraph; 
    3474  
    3475                 copyGraph(fixedGraph, outputGraph);  
    3476  
    3477                 keepComponent(topoOrder[noComp2D], outputGraph); 
    3478  
    3479  
    3480                 // Create the two 1D component vectors corresponding to the two third dimensions availables 
    3481                 // ---------------------------------------------------------------------------------------- 
    3482  
    3483                 switch(fixedDim) { 
    3484  
    3485                         case 0: 
    3486  
    3487                                 setInner(noComp, fixedDim, noComp2D, 1, 2, outputGraph, innerComp);    // jk     
    3488          
    3489                                 setInner(noComp, fixedDim, noComp2D, 2, 1, outputGraph, innerComp);    // kj 
    3490  
    3491                         break; 
    3492  
    3493                         case 1: 
    3494  
    3495                                 setInner(noComp, fixedDim, noComp2D, 0, 2, outputGraph, innerComp);    // ik 
    3496  
    3497                                 setInner(noComp, fixedDim, noComp2D, 2, 0, outputGraph, innerComp);    // ki 
    3498  
    3499                         break; 
    3500  
    3501                         case 2: 
    3502  
    3503                                 setInner(noComp, fixedDim, noComp2D, 0, 1, outputGraph, innerComp);    // ij 
    3504  
    3505                                 setInner(noComp, fixedDim, noComp2D, 1, 0, outputGraph, innerComp);    // ji 
    3506  
    3507                         break; 
    3508                 } 
    3509         } 
    3510 }; 
    3511  
    3512  
    3513  
    3514 void Order::read1D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph) { 
    3515  
    3516         ofstream hiddenFile; 
    3517  
    3518         // For all the components embedded in the 3D graph 
    3519         // ----------------------------------------------- 
    3520  
    3521         for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 
    3522  
    3523                 // For all the components embedded in the 2D graph coming from the current 3D component 
    3524                 // ------------------------------------------------------------------------------------ 
    3525  
    3526                 for(int noComp2D = 0; noComp2D < middleComp[noComp3D][0].size(); noComp2D++)  { 
    3527  
    3528                         // For all the components embedded in the 1D graph coming from the current 2D component 
    3529                         // ------------------------------------------------------------------------------------ 
    3530  
    3531                         for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][1].size(); noComp1D++)  { 
    3532  
    3533                                 // Get the value of the first axis (third in the data structure as it is a 3D data structure, no need to get the number of the axis as there is only one) 
    3534                                 // ------------------------------------------------------------------------------------------------------------------------------------------------------      
    3535  
    3536                                 int valAxis1 = innerComp[noComp3D][0][noComp2D][1][noComp1D].cfcSign[0].second; 
    3537  
    3538                                 // Read the order paramater for this axis value (axis number and parameter number are fixed as there is just one dimension) 
    3539                                 // ------------------------------------------------------------------------------------------------------------------------ 
    3540  
    3541                                 readParam(0, valAxis1, 1); 
    3542  
    3543                                 hiddenFile.open(theProject.c_str(), ios::app); 
    3544  
    3545                                 hiddenFile << endl << endl << "\t\t"; 
    3546  
    3547                                 // For all the modules embedded in the current 1D component 
    3548                                 // -------------------------------------------------------- 
    3549  
    3550                                 for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls.size(); noMod++) { 
    3551  
    3552                                         // Insert the modules after the paramaters 
    3553                                         // --------------------------------------- 
    3554  
    3555                                         hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls[noMod]) << " "; 
    3556  
    3557                                         this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls[noMod])); 
    3558  
    3559                                 } 
    3560          
    3561                                 hiddenFile.close(); 
     3368                /**** 
     3369 
     3370 
     3371                if(!isConnected) {  
     3372 
     3373                        cout << endl << "NOT CONNECTED";  
     3374 
     3375                        if(sign0 == 2 && sign1 == 2)  cout << endl << "oConf 222 : "; 
     3376                } 
     3377 
     3378                ****/ 
     3379 
     3380 
     3381                if(isConnected) { 
     3382 
     3383                        // Detecting all possible axis combinations  
     3384                        // ---------------------------------------- 
     3385 
     3386                        int noConf = -1; 
     3387 
     3388                        if(sign0 != 2 && sign1 != 2)  noConf = 0;       // axis0 -> axis1 (axis1 free) 
     3389                        if(sign0 != 2 && sign1 == 2)  noConf = 1;       // axis0 -> axis1  
     3390                        if(sign0 == 2 && sign1 == 2)  noConf = 2;       // axis0 -> axis1 
     3391                        if(sign0 == 2 && sign1 != 2)  noConf = 3;       // axis1 -> axis0  
     3392 
     3393                        // Looking at combinations to set imposed values for the second axis  
     3394                        // ----------------------------------------------------------------- 
     3395 
     3396                        if(noConf < 3) isImposed2D[noComponent][1] = getImposed(axis1, noComponent, fixedGraph); 
     3397 
     3398                        if(noConf == 3) isImposed2D[noComponent][1] = getImposed(axis0, noComponent, fixedGraph); 
     3399 
     3400                        // Sort the axis then set their values accordignly to the combination available for the current 2D component 
     3401                        // --------------------------------------------------------------------------------------------------------- 
     3402 
     3403                        if(noConf == 0) { 
     3404 
     3405                                middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = 0; 
     3406 
     3407                                if(isImposed2D[noComponent][0] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = isImposed2D[noComponent][0]; 
     3408                                if(isImposed2D[noComponent][1] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][1]; 
     3409                        } 
     3410 
     3411                        if(noConf > 0 && noConf < 3) { 
     3412 
     3413                                if(isImposed2D[noComponent][0] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = isImposed2D[noComponent][0]; 
     3414                                if(isImposed2D[noComponent][1] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][1]; 
     3415                        } 
     3416 
     3417                        if(noConf == 3) { 
     3418 
     3419                                int tmpVal = middleComp[noComp][fixedDim][noComponent].cfcSign[0].second; 
     3420                                middleComp[noComp][fixedDim][noComponent].cfcSign[0].second = middleComp[noComp][fixedDim][noComponent].cfcSign[1].second; 
     3421                                middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = tmpVal; 
     3422                                middleComp[noComp][fixedDim][noComponent].cfcSign[0].first = axis1; 
     3423                                middleComp[noComp][fixedDim][noComponent].cfcSign[1].first = axis0; 
     3424 
     3425                             // if(isImposed2D[noComponent][0] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][0];  
     3426                                if(isImposed2D[noComponent][1] != 0) middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = isImposed2D[noComponent][1]; 
     3427                        } 
     3428                } 
     3429 
     3430        // If the last axis value is not defined  
     3431 
     3432         if(middleComp[noComp][fixedDim][noComponent].cfcSign[1].second == 2) { 
     3433 
     3434                // If no decomposition is not needed, then set the value to zero to avoid decomposition  
     3435 
     3436                if(!isToDecompose(middleComp[noComp][fixedDim][noComponent].cfcSign[1].first, fixedGraph)) { 
     3437 
     3438                        middleComp[noComp][fixedDim][noComponent].cfcSign[1].second = 0; 
     3439 
    35623440                        } 
    35633441                } 
    35643442        } 
    35653443 
     3444 
     3445        // ETAPE 6 DE LA PROCEDURE A DEUX DIMENSION  
     3446        // ------------------------------------- 
     3447 
     3448        myGraphType cfcGraph; 
     3449 
     3450        reduceGraph(fixedGraph, cfcGraph, nbComponents); 
     3451 
     3452        // ETAPE 7 DE LA PROCEDURE A DEUX DIMENSION  
     3453        // ---------------------------------------- 
     3454 
     3455        std::deque<int> topoOrder; 
     3456 
     3457        if(boost::num_vertices(cfcGraph) > 1) { 
     3458 
     3459                // Perform a topological sort on the graph whose vertices are the components (reduced graph) 
     3460                // ----------------------------------------------------------------------------------------- 
     3461 
     3462                boost::topological_sort(cfcGraph, std::front_inserter(topoOrder), boost::vertex_index_map(boost::identity_property_map())); 
     3463 
     3464                // ETAPE 8 DE LA PROCEDURE A DEUX DIMENSION  
     3465                // ---------------------------------------- 
     3466 
     3467                // Sort the middle structure table elements (2D graph components) accordignly to the sorting performed on the reduced graph  
     3468                // ------------------------------------------------------------------------------------------------------------------------ 
     3469 
     3470                vector<cfcStruct> sortedCfcStructTable; 
     3471 
     3472                for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) sortedCfcStructTable.push_back(middleComp[noComp][fixedDim][topoOrder[noComponent]]); 
     3473 
     3474                middleComp[noComp][fixedDim].clear(); 
     3475 
     3476                for(int noComponent = 0; noComponent < topoOrder.size(); noComponent++) middleComp[noComp][fixedDim].push_back(sortedCfcStructTable[noComponent]); 
     3477 
     3478        } 
     3479 
     3480        else { topoOrder[0] = 0; } 
     3481 
     3482 
     3483        // ETAPE 9 DE LA PROCEDURE A DEUX DIMENSION  
     3484        // ---------------------------------------- 
     3485 
     3486        // Create a graph that just keep the current 2D component egdes and vertices  
     3487        // ------------------------------------------------------------------------- 
     3488 
     3489        for(int noComp2D = 0; noComp2D < nbComponents; noComp2D++) { 
     3490 
     3491                myGraphType outputGraph; 
     3492 
     3493                copyGraph(fixedGraph, outputGraph); 
     3494 
     3495                keepComponent(topoOrder[noComp2D], outputGraph); 
     3496 
     3497 
     3498                // Create the two 1D component vectors corresponding to the two third dimensions availables 
     3499                // ---------------------------------------------------------------------------------------- 
     3500 
     3501 
     3502                setInner(noComp, fixedDim, noComp2D, middleComp[noComp][fixedDim][noComp2D].cfcSign[0].first, middleComp[noComp][fixedDim][noComp2D].cfcSign[1].first, outputGraph, innerComp); 
     3503 
     3504                /******** 
     3505                 
     3506                switch(fixedDim) { 
     3507 
     3508                        case 0: 
     3509 
     3510 
     3511                                setInner(noComp, fixedDim, noComp2D, 1, 2, outputGraph, innerComp);    // jk     
     3512 
     3513                                setInner(noComp, fixedDim, noComp2D, 2, 1, outputGraph, innerComp);    // kj 
     3514 
     3515                        break; 
     3516 
     3517                        case 1: 
     3518 
     3519                                setInner(noComp, fixedDim, noComp2D, 0, 2, outputGraph, innerComp);    // ik 
     3520 
     3521                                setInner(noComp, fixedDim, noComp2D, 2, 0, outputGraph, innerComp);    // ki 
     3522 
     3523                        break; 
     3524 
     3525                        case 2: 
     3526 
     3527                                setInner(noComp, fixedDim, noComp2D, 0, 1, outputGraph, innerComp);    // ij 
     3528 
     3529                                setInner(noComp, fixedDim, noComp2D, 1, 0, outputGraph, innerComp);    // ji 
     3530 
     3531                        break; 
     3532                } 
     3533 
     3534        **********/ 
     3535 
     3536        } 
     3537}; 
     3538 
     3539 
     3540 
     3541void Order::read1D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph) { 
     3542 
     3543        ofstream hiddenFile; 
     3544 
     3545        // For all the components embedded in the 3D graph 
     3546        // ----------------------------------------------- 
     3547 
     3548        for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 
     3549 
     3550                // For all the components embedded in the 2D graph coming from the current 3D component 
     3551                // ------------------------------------------------------------------------------------ 
     3552 
     3553                for(int noComp2D = 0; noComp2D < middleComp[noComp3D][0].size(); noComp2D++)  { 
     3554 
     3555                        // For all the components embedded in the 1D graph coming from the current 2D component 
     3556                        // ------------------------------------------------------------------------------------ 
     3557 
     3558                        for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][1].size(); noComp1D++)  { 
     3559 
     3560                                // Get the value of the first axis (third in the data structure as it is a 3D data structure, no need to get the number of the axis as there is only one) 
     3561                                // ------------------------------------------------------------------------------------------------------------------------------------------------------      
     3562 
     3563                                int valAxis1 = innerComp[noComp3D][0][noComp2D][1][noComp1D].cfcSign[0].second; 
     3564 
     3565                                // Read the order paramater for this axis value (axis number and parameter number are fixed as there is just one dimension) 
     3566                                // ------------------------------------------------------------------------------------------------------------------------ 
     3567 
     3568                                readParam(0, valAxis1, 1); 
     3569 
     3570                                hiddenFile.open(theProject.c_str(), ios::app); 
     3571 
     3572                                hiddenFile << endl << "    "; 
     3573 
     3574                                // For all the modules embedded in the current 1D component 
     3575                                // -------------------------------------------------------- 
     3576 
     3577                                for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls.size(); noMod++) { 
     3578 
     3579                                        // Insert the modules after the paramaters 
     3580                                        // --------------------------------------- 
     3581 
     3582                                        hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls[noMod]) << " "; 
     3583 
     3584                                        this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls[noMod])); 
     3585 
     3586                                } 
     3587 
     3588                                hiddenFile.close(); 
     3589                        } 
     3590                } 
     3591        } 
     3592 
    35663593        // Close the order statement 
    35673594        // ------------------------- 
     
    35753602void Order::read2D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph) { 
    35763603 
    3577         ofstream hiddenFile; 
    3578  
    3579         // For all 3D components in the main graph 
    3580         // ---------------------------------------- 
     3604        ofstream hiddenFile; 
     3605 
     3606        // For all 3D components in the main graph 
     3607        // ---------------------------------------- 
    35813608 
    35823609        for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 
    35833610 
    3584                 // For all components in the 2D graph coming from the current 3D component with the first axis fixed   
    3585                 // ------------------------------------------------------------------------------------------------- 
     3611                // For all components in the 2D graph coming from the current 3D component with the first axis fixed   
     3612                // ------------------------------------------------------------------------------------------------- 
    35863613 
    35873614                for(int noComp2D = 0; noComp2D < middleComp[noComp3D][0].size(); noComp2D++)  { 
    35883615 
    3589                         // Get the the the first axis dimension (second in the data structure as it is a 3D data structure) 
    3590                         // ------------------------------------------------------------------------------------------------ 
     3616                        // Get the the the first axis dimension (second in the data structure as it is a 3D data structure) 
     3617                        // ------------------------------------------------------------------------------------------------ 
    35913618 
    35923619                        int noFixed1  = middleComp[noComp3D][0][noComp2D].cfcSign[0].first; 
    3593  
    3594                         // Get the first axis value (second in the data structure as it is a 3D data structure) 
    3595                         // ------------------------------------------------------------------------------------ 
     3620                         
     3621                        // Get the first axis value (second in the data structure as it is a 3D data structure) 
     3622                        // ------------------------------------------------------------------------------------ 
    35963623 
    35973624                        int valFixed1 = middleComp[noComp3D][0][noComp2D].cfcSign[0].second; 
     3625 
     3626                        // Read the order parameter for this dimension and this axis (decrease the axis dimension number as it is just the first parameter) 
     3627                        // -------------------------------------------------------------------------------------------------------------------------------- 
     3628 
     3629                        readParam(noFixed1 -1, valFixed1, 1); 
     3630 
     3631                        // Get the second axis dimension (third in the data structure as it is a 3D data structure) 
     3632                        // ---------------------------------------------------------------------------------------- 
     3633 
     3634                        int noAxis2  = middleComp[noComp3D][0][noComp2D].cfcSign[1].first; 
     3635 
     3636                        // Get the second axis value (third in the data structure as it is a 3D data structure) 
     3637                        // ------------------------------------------------------------------------------------ 
     3638 
     3639                        int valAxis2 = middleComp[noComp3D][0][noComp2D].cfcSign[1].second; 
     3640 
     3641                        // If the second axis value is defined  
     3642                        // ----------------------------------- 
     3643 
     3644                        if(valAxis2 != 2) { 
     3645 
     3646                                // Read the order parameter for this dimension and this axis (decrease the axis dimension number as there is just 2 dimensions) 
     3647                                // ---------------------------------------------------------------------------------------------------------------------------- 
     3648 
     3649                                readParam(noAxis2 -1, valAxis2, 2); 
     3650 
     3651                                hiddenFile.open(theProject.c_str(), ios::app); 
     3652 
     3653                                hiddenFile << endl << "    "; 
     3654 
     3655                                // For all components in the 1D graph coming from the current 2D component with the two first axis fixed  
     3656                                // ----------------------------------------------------------------------------------------------------- 
     3657 
     3658                                for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][noFixed1].size(); noComp1D++) { 
     3659 
     3660                                        // For all the moduls embedded in the current 1D component  
     3661                                        // -------------------------------------------------------       
     3662 
     3663                                        for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].embeddedModuls.size(); noMod++) { 
     3664 
     3665                                                // Insert the modul name in the current order parameter  
     3666                                                // ---------------------------------------------------- 
     3667 
     3668                                                hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].embeddedModuls[noMod]) << " "; 
     3669 
     3670                                                this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].embeddedModuls[noMod])); 
     3671 
     3672                                        } 
     3673 
     3674                                } 
     3675 
     3676                                hiddenFile.close(); 
     3677                        } 
     3678 
     3679                        // If the second axis value is not defined 
     3680                        // --------------------------------------- 
     3681 
     3682                        else { 
     3683 
     3684                                // For all components in the 1D graph coming from the current 2D component with the first axis fixed  
     3685                                // ------------------------------------------------------------------------------------------------- 
     3686 
     3687                                for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][noFixed1].size(); noComp1D++) { 
     3688 
     3689                                        // Get the second axis dimension (third in the data structure as it is a 3D data structure) 
     3690                                        // ---------------------------------------------------------------------------------------- 
     3691 
     3692                                        int noAxis3 = innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].cfcSign[0].first; 
    35983693         
    3599                         // Read the order parameter for this dimension and this axis (decrease the axis dimension number as it is just the first parameter) 
    3600                         // -------------------------------------------------------------------------------------------------------------------------------- 
    3601  
    3602                         readParam(noFixed1 -1, valFixed1, 1); 
    3603                  
    3604                         hiddenFile.open(theProject.c_str(), ios::app); 
    3605          
    3606                         hiddenFile << endl << endl << "\t\t"; 
    3607  
    3608                         hiddenFile.close(); 
    3609          
    3610                         // Get the second axis dimension (third in the data structure as it is a 3D data structure) 
    3611                         // ---------------------------------------------------------------------------------------- 
    3612  
    3613                         int noAxis2  = middleComp[noComp3D][0][noComp2D].cfcSign[1].first; 
    3614  
    3615                         // Get the second axis value (third in the data structure as it is a 3D data structure) 
    3616                         // ------------------------------------------------------------------------------------ 
    3617  
    3618                         int valAxis2 = middleComp[noComp3D][0][noComp2D].cfcSign[1].second; 
    3619  
    3620                         // If the second axis value is defined  
    3621                         // ----------------------------------- 
    3622  
    3623                         if(valAxis2 != 2) { 
    3624  
    3625                                 // Read the order parameter for this dimension and this axis (decrease the axis dimension number as there is just 2 dimensions) 
    3626                                 // ---------------------------------------------------------------------------------------------------------------------------- 
    3627  
    3628                                 readParam(noAxis2 -1, valAxis2, 2); 
    3629          
    3630                                 hiddenFile.open(theProject.c_str(), ios::app); 
    3631  
    3632                                 hiddenFile << endl << endl << "\t\t"; 
    3633          
    3634                                 // For all components in the 1D graph coming from the current 2D component with the two first axis fixed  
    3635                                 // ----------------------------------------------------------------------------------------------------- 
    3636  
    3637                                 for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][noAxis2].size(); noComp1D++) { 
    3638  
    3639                                         // For all the moduls embedded in the current 1D component  
    3640                                         // -------------------------------------------------------       
    3641  
    3642                                         for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls.size(); noMod++) { 
    3643  
    3644                                                 // Insert the modul name in the current order parameter  
    3645                                                 // ---------------------------------------------------- 
    3646  
    3647                                                 hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
    3648                                          
    3649                                                 this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]));   
    3650                                                  
    3651                                         } 
    3652                  
    3653                                 } 
    3654          
    3655                                 hiddenFile.close(); 
    3656                         }  
    3657  
    3658                         // If the second axis value is not defined 
    3659                         // --------------------------------------- 
    3660  
    3661                         else { 
    3662          
    3663                                 // For all components in the 1D graph coming from the current 2D component with the first axis fixed  
    3664                                 // ------------------------------------------------------------------------------------------------- 
    3665                          
    3666                                 for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][noAxis2].size(); noComp1D++) { 
    3667  
    3668                                         // Get the second axis dimension (third in the data structure as it is a 3D data structure) 
    3669                                         // ---------------------------------------------------------------------------------------- 
    3670  
    3671                                         int noAxis3 = innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].cfcSign[0].first; 
    3672  
    3673                                         // Get the second axis value (third in the data structure as it is a 3D data structure) 
    3674                                         // ------------------------------------------------------------------------------------ 
    3675                                 
    3676                                         int valAxis3 = innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].cfcSign[0].second; 
    3677  
    3678                                         // Read the order parameter for this dimension and this axis (decrease the axis dimension number as there is just 2 dimensions) 
    3679                                         // ---------------------------------------------------------------------------------------------------------------------------- 
    3680                                 
    3681                                         readParam(noAxis3 -1, valAxis3, 2); 
    3682  
    3683                                         hiddenFile.open(theProject.c_str(), ios::app); 
    3684  
    3685                                         hiddenFile << endl << endl << "\t\t"; 
    3686  
    3687                                         // For all the moduls embedded in the current 1D component 
    3688                                         // ------------------------------------------------------- 
    3689                                 
    3690                                         for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls.size(); noMod++) { 
    3691          
    3692                                                 // Insert the modul name in the current order parameter  
    3693                                                 // ---------------------------------------------------- 
    3694                                          
    3695                                                 hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
    3696  
    3697                                                 this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
    3698                                                  
    3699                                         } 
    3700  
    3701                                         hiddenFile.close(); 
    3702                                 } 
    3703                         } 
     3694                                        // Get the second axis value (third in the data structure as it is a 3D data structure) 
     3695                                        // ------------------------------------------------------------------------------------ 
     3696 
     3697                                        int valAxis3 = innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].cfcSign[0].second; 
     3698 
     3699                                        // Read the order parameter for this dimension and this axis (decrease the axis dimension number as there is just 2 dimensions) 
     3700                                        // ---------------------------------------------------------------------------------------------------------------------------- 
     3701 
     3702                                        readParam(noAxis3 -1, valAxis3, 2); 
     3703 
     3704                                        hiddenFile.open(theProject.c_str(), ios::app); 
     3705 
     3706                                        hiddenFile << endl << "    "; 
     3707 
     3708                                        // For all the moduls embedded in the current 1D component 
     3709                                        // ------------------------------------------------------- 
     3710 
     3711                                        for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].embeddedModuls.size(); noMod++) { 
     3712 
     3713                                                // Insert the modul name in the current order parameter  
     3714                                                // ---------------------------------------------------- 
     3715 
     3716                                                hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].embeddedModuls[noMod]) << " "; 
     3717 
     3718                                                this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noFixed1][noComp1D].embeddedModuls[noMod])); 
     3719 
     3720                                        } 
     3721 
     3722                                        hiddenFile.close(); 
     3723                                } 
     3724                        } 
    37043725                } 
    37053726        } 
    3706          
    3707         // Close the order statement  
    3708         // ------------------------- 
     3727 
     3728        // Close the order statement  
     3729        // ------------------------- 
    37093730 
    37103731        readParam(0, 0, 0); 
     
    37173738void Order::read3D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph) { 
    37183739 
    3719         ofstream hiddenFile; 
    3720  
    3721         // For all the components embedded in the 3D graph 
     3740        ofstream hiddenFile; 
     3741 
     3742        // For all the components embedded in the 3D graph 
    37223743        // ----------------------------------------------- 
    37233744 
     
    37643785                                readParam(noAxis3, valAxis3, 3); 
    37653786 
    3766                                 hiddenFile.open(theProject.c_str(), ios::app); 
    3767  
    3768                                 hiddenFile << endl << endl << "\t\t\t"; 
     3787                                hiddenFile.open(theProject.c_str(), ios::app); 
     3788 
     3789                                hiddenFile << endl << "      "; 
    37693790 
    37703791                                // For all 2D graphs embedded in the current 3D graph (ie the fixed dimension is the first crossed in the order statement) 
     
    37913812                                                        // -----------------------------------------------------------------------------------------------       
    37923813 
    3793                                                         hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
    3794  
    3795                                         this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
    3796                                          
     3814                                                        hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
     3815 
     3816                                        this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
     3817 
    37973818                                                } 
    37983819                                        } 
    37993820                                } 
    38003821 
    3801                                 hiddenFile.close(); 
     3822                                hiddenFile.close(); 
    38023823                        } 
    38033824 
     
    38363857 
    38373858                                        readParam(noAxis3, valAxis3, 3); 
    3838          
    3839                                         hiddenFile.open(theProject.c_str(), ios::app); 
    3840  
    3841                                         hiddenFile << endl << endl << "\t\t\t"; 
     3859 
     3860                                        hiddenFile.open(theProject.c_str(), ios::app); 
     3861 
     3862                                        hiddenFile << endl << "      "; 
    38423863 
    38433864                                        // For all moduls embedded in the current 1D graph component 
     
    38493870                                                // ----------------------------------------------------------------------------------------------- 
    38503871 
    3851                                                 hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
    3852  
    3853                                                 this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]));    
     3872                                                hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
     3873 
     3874                                                this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
    38543875 
    38553876                                        } 
    38563877 
    3857                                         hiddenFile.close(); 
     3878                                        hiddenFile.close(); 
    38583879                             } 
    38593880                       } 
     
    39133934                                        readParam(noAxis3, valAxis3, 3); 
    39143935 
    3915                                         hiddenFile.open(theProject.c_str(), ios::app); 
    3916  
    3917                                         hiddenFile << endl << endl << "\t\t\t"; 
     3936                                        hiddenFile.open(theProject.c_str(), ios::app); 
     3937 
     3938                                        hiddenFile << endl << "      "; 
    39183939 
    39193940                                        // For all 1D graph embedded in the current 2D graph (ie the second fixed dimension is the second crossed in the order statement) 
     
    39303951                                                        // ------------------------------------------------------------------------------------------------- 
    39313952 
    3932                                                         hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
    3933  
    3934                                                 this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
    3935           
     3953                                                        hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
     3954 
     3955                                                this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
     3956 
    39363957                                                } 
    39373958                                        } 
    39383959 
    3939                                         hiddenFile.close(); 
     3960                                        hiddenFile.close(); 
    39403961                                } 
    39413962 
     
    39653986                                                readParam(noAxis3, valAxis3, 3); 
    39663987 
    3967                                                 hiddenFile.open(theProject.c_str(), ios::app);   
    3968  
    3969                                                 hiddenFile << endl << endl << "\t\t\t"; 
     3988                                                hiddenFile.open(theProject.c_str(), ios::app); 
     3989 
     3990                                                hiddenFile << endl << "      "; 
    39703991 
    39713992                                                // For all moduls embedded in the current 1D graph component 
     
    39773998                                                        // ------------------------------------------------------------------------------------------------- 
    39783999 
    3979                                                         hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
    3980  
    3981                                                 this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
     4000                                                        hiddenFile << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 
     4001 
     4002                                                this -> orderTokens.push_back(boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][noFixed1][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod])); 
    39824003 
    39834004                                                } 
    39844005 
    3985                                                 hiddenFile.close(); 
     4006                                                hiddenFile.close(); 
    39864007                                        } 
    39874008                                } 
     
    39904011        } 
    39914012 
    3992         } 
     4013        } 
    39934014 
    39944015        // Close the order statement 
     
    40224043        // ------------------------------------------------------------------------------------------------------------------------------------------- 
    40234044 
    4024         int value = getCommonSign(freeDim, noComp, fixedGraph); 
    4025  
    4026         if(value == 3) value = 0; 
    4027  
    4028         // Return the sign for the free dimension and the component given as parameter  
     4045        int value = getCommonSign(freeDim, noComp, fixedGraph); 
     4046 
     4047        if(value == 3) value = 0; 
     4048 
     4049        // Return the sign for the free dimension and the component given as parameter  
    40294050        // --------------------------------------------------------------------------- 
    40304051 
     
    40324053 
    40334054}; 
     4055 
     4056 
     4057bool Order::isToDecompose2D(int fixedDim, int noComponent, myGraphType& upperGraph) { 
     4058 
     4059        bool toDecompose = true; 
     4060 
     4061        myGraphType fixedGraph, fixedGraphDim1, fixedGraphDim2; 
     4062 
     4063        // Fix the graph for the axis that is the first one of the order statement 
     4064        // ----------------------------------------------------------------------- 
     4065 
     4066        copyGraph(upperGraph, fixedGraph); 
     4067 
     4068        fixGraph(fixedGraph, fixedDim); 
     4069 
     4070        copyGraph(fixedGraph, fixedGraphDim1); 
     4071 
     4072        copyGraph(fixedGraph, fixedGraphDim2); 
     4073 
     4074        int freeDim1, freeDim2; 
     4075 
     4076        if(fixedDim== 0) { freeDim1 = 1; freeDim2 = 2; } 
     4077 
     4078        if(fixedDim== 1) { freeDim1 = 0; freeDim2 = 2; } 
     4079 
     4080        if(fixedDim== 2) { freeDim1 = 0; freeDim2 = 1; } 
     4081 
     4082        fixGraph(fixedGraphDim1, freeDim1); 
     4083 
     4084        fixGraph(fixedGraphDim2, freeDim2); 
     4085 
     4086        // If there is a common value in one of the two remaining dimension of the fixed graph, then no decomposition is needed 
     4087        // -------------------------------------------------------------------------------------------------------------------- 
     4088 
     4089        if(getCommonSign(freeDim1, noComponent, fixedGraph) != 2 || getCommonSign(freeDim2, noComponent, fixedGraph) != 2) toDecompose = false; 
     4090 
     4091        if(getCommonSign(freeDim1, noComponent, fixedGraphDim2) == 2 || getCommonSign(freeDim2, noComponent, fixedGraphDim1) == 2) toDecompose = true; 
     4092 
     4093        return(toDecompose); 
     4094 
     4095        }; 
    40344096 
    40354097 
     
    40784140        int valDim0 = 0; 
    40794141 
    4080         // For all the vertices 
    4081         // -------------------- 
     4142        // For all the vertices 
     4143        // -------------------- 
    40824144 
    40834145        for(tie(edgeIterOne, edgeIterTwo) = edges(currentGraph); edgeIterOne != edgeIterTwo; ++edgeIterOne) { 
     
    41264188        int valDim0 = 0; 
    41274189 
    4128         // A value that will set to true only if it exist an edge between the component vertices 
    4129         // ------------------------------------------------------------------------------------- 
    4130  
    4131         bool isConnected = false;  
    4132          
     4190        // A value that will set to true only if it exist an edge between the component vertices 
     4191        // ------------------------------------------------------------------------------------- 
     4192 
     4193        bool isConnected = false; 
     4194 
    41334195        // For all edges in the current graph 
    41344196        // ---------------------------------- 
     
    41364198        for(tie(edgeIterOne, edgeIterTwo) = edges(currentGraph); edgeIterOne != edgeIterTwo; ++edgeIterOne) { 
    41374199 
     4200        // *** cout << endl << boost::source(*edgeIterOne, currentGraph) << " ==> " << boost::target(*edgeIterOne, currentGraph);  
     4201 
    41384202                // If the source modul of the edge is in the component given as paramater 
    41394203                // ---------------------------------------------------------------------- 
     
    41464210                        if(get(boost::vertex_affected_comp_t(), currentGraph, boost::target(*edgeIterOne, currentGraph)) == noComp)  { 
    41474211 
    4148                                 // Update isConnected as it exist a connexion inside the component 
    4149                                 // --------------------------------------------------------------- 
    4150  
    4151                                 isConnected = true; 
     4212                                // Update isConnected as it exist a connexion inside the component 
     4213                                // --------------------------------------------------------------- 
     4214 
     4215                                isConnected = true; 
    41524216 
    41534217                                // Get the dimension values for axis i, j and k  
     
    41804244        } 
    41814245 
    4182         if(isConnected) return(valDim0);  
    4183         return(3);  
     4246        // ***** cout << endl << "isConnected : " << isConnected; 
     4247 
     4248        if(isConnected) return(valDim0); 
     4249        return(3); 
    41844250}; 
    41854251 
     
    42054271        if(freeDim == 2) { fixGraph(fixedGraph, 0); fixGraph(fixedGraph, 1); }  // i == 0, j == 0 
    42064272 
    4207         // If there is just one vertex without reflexive edge in the component, then hide the returned value by setting it as free (ie 0 instead of 3) 
     4273        // If there is just one vertex without reflexive edge in the component, then hide the returned value by setting it as free (ie 0 instead of 3) 
    42084274        // ------------------------------------------------------------------------------------------------------------------------------------------- 
    42094275 
     
    42154281        // --------------------------------------------------------------------------- 
    42164282 
    4217         return(value); 
     4283        return(value); 
    42184284 
    42194285}; 
    4220          
     4286 
    42214287 
    42224288void Order::resetGraph(myGraphType& currentGraph) { 
     
    42714337 
    42724338void Order::showTokens(Table<Order>&  theOrderTable) { 
    4273         for(Table<Order>::iterator tok_tab = theOrderTable.begin(); tok_tab < theOrderTable.end(); tok_tab++) {      
    4274           
    4275                 cout << endl << tok_tab -> getName();  
    4276                 cout << endl << tok_tab -> getOrderPhase(); 
    4277                                                      
    4278                 for(vector<string>::iterator tok_str = tok_tab -> orderTokens.begin(); tok_str < tok_tab -> orderTokens.end(); tok_str++) {  
    4279                         cout << endl << "\t" << *tok_str; 
    4280                 } 
    4281         } 
     4339        for(Table<Order>::iterator tok_tab = theOrderTable.begin(); tok_tab < theOrderTable.end(); tok_tab++) { 
     4340 
     4341                cout << endl << tok_tab -> getName(); 
     4342                cout << endl << tok_tab -> getOrderPhase(); 
     4343 
     4344                for(vector<string>::iterator tok_str = tok_tab -> orderTokens.begin(); tok_str < tok_tab -> orderTokens.end(); tok_str++) { 
     4345                        cout << endl << "\t" << *tok_str; 
     4346                } 
     4347        } 
    42824348}; 
    42834349 
     
    42894355 
    42904356 
     4357                                                                                                                                                                                                                                                                                                                                                                                                          
  • trunk/yao/src/YAOObjects/Order.hpp

    r293 r310  
    220220                           boost::property<boost::vertex_topo_order_t, int, 
    221221                           boost::property<boost::vertex_affected_comp_t, int, 
    222                            boost::property<boost::vertex_original_id_t, int > > > > verticesProperties; 
    223  
    224    // Definition of the edges properties embedded in the graph type that will be used in all the order generation functions.     
    225    typedef boost::property<boost::edge_weight_d1_t, int,  
    226                            boost::property<boost::edge_weight_d2_t, int,  
    227                            boost::property<boost::edge_weight_d3_t, int > > > edgesPorperties; 
     222                           boost::property<boost::vertex_original_id_t, int > > > > verticesProperties; 
     223 
     224   // Definition of the edges properties embedded in the graph type that will be used in all the order generation functions.     
     225   typedef boost::property<boost::edge_weight_d1_t, int, 
     226                           boost::property<boost::edge_weight_d2_t, int, 
     227                           boost::property<boost::edge_weight_d3_t, int > > > edgesPorperties; 
    228228 
    229229   // Definition of the graph type that will be used in all the order generation functions.  
     
    239239   typedef vector<cfcStruct> cfcStructTableType; 
    240240 
    241    typedef cfcStructTableType** middleCompType;  
     241   typedef cfcStructTableType** middleCompType; 
    242242 
    243243   typedef cfcStructTableType**** innerCompType; 
    244          
     244 
    245245   // Graph iterators and descriptors that are used all along the program (declared here to avoid several decalarations inside the source code).  
    246246 
     
    256256 
    257257   string theProject; 
    258     
     258 
    259259    public: 
    260260 
    261         /** 
    262         * Get informations on connections, modules and spaces then launch all the procedures used to generate the order statments.  
    263         * The relevant informations are extracted from the existing tables then integrated in dedicated light structures. 
    264         * The dedicated structures are declared as global datas then accessed and updated by the functions.  
    265         */ 
    266         void automaticOrderGenerator(string projectName, Table<Order>& theOrderTable, Table<Modul>& myModulTable, Table<Connection>& myConnectionTable, Table<Space>& mySpaceTable); 
     261        /** 
     262        * Get informations on connections, modules and spaces then launch all the procedures used to generate the order statments.  
     263        * The relevant informations are extracted from the existing tables then integrated in dedicated light structures. 
     264        * The dedicated structures are declared as global datas then accessed and updated by the functions.  
     265        */ 
     266        void automaticOrderGenerator(string projectName, Table<Order>& theOrderTable, Table<Modul>& myModulTable, Table<Connection>& myConnectionTable, Table<Space>& mySpaceTable); 
    267267 
    268268    private: 
    269269 
    270         // -- Functions that build and populate the data structures -- 
    271  
    272         /** 
     270        // -- Functions that build and populate the data structures -- 
     271 
     272        /** 
    273273        * Function that manage the 3D components by performing the following tasks :  
    274274        *       - get all the components from the main graph (tarjan component search) 
     
    285285        void setOuter(cfcStructTableType& outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
    286286 
    287         /** 
     287        /** 
    288288        * Function that manage the 2D components by performing the following tasks :  
    289289        *       - get a 3D component graph from setOuter(), this one is given as a parameter 
     
    306306        void setMiddle(int fixedDim, int dimOne, int dimTwo, myGraphType& currentGraph, int noComp, middleCompType& middleComp, innerCompType& innerComp); 
    307307 
    308         /**      
     308        /**      
    309309        * Function that manage the 1D components by performing the following tasks :  
    310310        *       - get a 2D component graph from setMiddle() 
     
    327327        void setInner(int noComp3D, int noFixed1, int noComp2D, int noFixed2, int freeDim, myGraphType& upperGraph, innerCompType& innerComp); 
    328328 
    329         // --  Functions for managing the graphs -- 
    330  
    331         /** 
     329        // --  Functions for managing the graphs -- 
     330 
     331        /** 
    332332        * Function for setting up the main graph. 
    333333        * This function create a graph then populate its properties accordignly to the boost API. 
    334334        * @param currentGraph a reference on the graph that should be created. 
    335         * @param valCi a vector of integer that register the connection values for the i dimension. 
    336         * @param valCj a vector of integer that register the connection values for the j dimension. 
    337         * @param valCk a vector of integer that register the connection values for the k dimension. 
    338         * @param modulList a vector of strings that regster the modul names. 
    339         * @param edgeArray a vector of edges that register the source modul and the target modul of each edge (connection).  
     335        * @param valCi a vector of integer that register the connection values for the i dimension. 
     336        * @param valCj a vector of integer that register the connection values for the j dimension. 
     337        * @param valCk a vector of integer that register the connection values for the k dimension. 
     338        * @param modulList a vector of strings that regster the modul names. 
     339        * @param edgeArray a vector of edges that register the source modul and the target modul of each edge (connection).  
    340340        */ 
    341341        void generateGraph(myGraphType& currentGraph, const vector<int>& valCi, const vector<int>& valCj, const vector<int>& valCk, const vector<string>& modulList, const vector<edge>& edgeArray); 
    342342 
    343         /** 
     343        /** 
    344344         * Function that make a deep copy from the graph upperGraph to the graph outGraph 
    345345         * The function is void and the graph outGraph have to be given as a parameter because there is some problems in getting a graph from a function   
     
    348348         * @param outGraph a reference to the graph that must receive all its informations from the copied graph  
    349349         */ 
    350         void copyGraph(myGraphType& upperGraph, myGraphType& outGraph); 
    351  
    352         /** 
     350        void copyGraph(myGraphType& upperGraph, myGraphType& outGraph); 
     351 
     352        /** 
    353353        * Function that keep only the edges with zero value for the dimension given as a parameter  
    354354        * As a result of this fixation, whe know that remaining connected vertices (moduls in YAO) are linked on the same node for the fixed dimension  
     
    356356        * @param noFixedDim an integer value indicating which dimension have to be fixed 
    357357        */ 
    358         void fixGraph(myGraphType& currentGraph, int noFixedDim); 
    359  
    360         /** 
     358        void fixGraph(myGraphType& currentGraph, int noFixedDim); 
     359 
     360        /** 
    361361        * Function that create a graph which vertices are the components of another graph 
    362362        * @param nbComp the number of components included in the innerGraph 
     
    364364        * @param outerGraph the reduced graph, which vertices are the components coming from the graph innerGraph  
    365365        */ 
    366         void reduceGraph(myGraphType innerGraph, myGraphType& outerGraph, int nbComp); 
    367  
    368         /** 
     366        void reduceGraph(myGraphType innerGraph, myGraphType& outerGraph, int nbComp); 
     367 
     368        /** 
    369369        * Function that is used to extract a component from a graph  
    370370        * This function create a subset graph that just include vertices (and edges) from the "noComp" component  
     
    374374        void keepComponent(int noComp, myGraphType& upperGraph); 
    375375 
    376         /** 
    377         * Function that reset the main graph and all its properties.  
    378         * This function make a tabula rasa of the graph that have been created for the latest space 
    379         * and allow it to register informations on the space that is currently analyzed. 
    380         * As informations on the graph are just used to create the current modinspace statement, there  
    381         * is no need to keep those informations from space to space.  
    382         * As as the main graph (myGraph) is a global data, it is very important to perform  this operation. 
    383         * @currentGraph a reference to the graph that must be resetted 
    384         */ 
    385         void resetGraph(myGraphType& currentGraph); 
    386  
    387  
    388         // -- Functions for managing axis (sign and ordering) -- 
    389  
    390         /** 
     376        /** 
     377        * Function that reset the main graph and all its properties.  
     378        * This function make a tabula rasa of the graph that have been created for the latest space 
     379        * and allow it to register informations on the space that is currently analyzed. 
     380        * As informations on the graph are just used to create the current modinspace statement, there  
     381        * is no need to keep those informations from space to space.  
     382        * As as the main graph (myGraph) is a global data, it is very important to perform  this operation. 
     383        * @currentGraph a reference to the graph that must be resetted 
     384        */ 
     385        void resetGraph(myGraphType& currentGraph); 
     386 
     387 
     388        // -- Functions for managing axis (sign and ordering) -- 
     389 
     390        /** 
    391391        * Function that perform an offset on the the data structures Ci, Cj and Ck before to create the main graph.  
    392392        * This offset tend to treat all the main graphs as 3D ones (and then to use the same entry function for both).  
     
    405405        void to3D(int nbDim, vector<int>& valCi, vector<int>& valCj, vector<int>& valCk, int nbEdges); 
    406406 
    407         /** 
     407        /** 
    408408        * Function that fix a dimension of a graph then perform a sign analysis after fixation  
    409409        * The fixation of the dimension "fixedDim" from the setOuter() function act as a forward checking on 2D components  
     
    414414        * @param upperGraph a reference to the graph on which the function must work  
    415415        */ 
    416         int getImposed(int fixedDim, int freeDim, int noComp, myGraphType& upperGraph); 
    417  
    418         /** 
     416        int getImposed(int fixedDim, int freeDim, int noComp, myGraphType& upperGraph); 
     417 
     418        /** 
    419419        * Function that fix two dimensions of a graph then perform a sign analysis after fixations 
    420420        * The fixation of the dimensions "fixedDimOne" and "fixedDimTwo" from the setOuter() function act as a forward checking on 1D components 
     
    426426        int getImposed(int freeDim, int noComp, myGraphType& upperGraph); 
    427427 
    428         /** 
     428        /** 
    429429        * Function used to know if the third axis have to be decomposed  
    430430        * This function reduce two times the main graph then seek a common value on the remaining edges  
     
    436436        bool isToDecompose(int freeDim, myGraphType& upperGraph); 
    437437 
    438         /** 
     438        bool isToDecompose2D(int fixedDim, int noComponent,  myGraphType& upperGraph); 
     439 
     440        /** 
    439441        * Function that get the axis sign for the dimension "noDim" on the edes of the component "noComp" in the graph "currentGraph" 
    440442        * return 0 if there is no edges, -1 or 1 if there is a common sign and -2 if there is no common sign  
     
    445447        int getCommonSign(int noDim, int noComp, myGraphType& currentGraph); 
    446448 
    447         /** 
    448         * Function that get the axis sign for the dimension "noDim"  in the graph "currentGraph" 
    449         * return 0 if there is no edges, -1 or 1 if there is a common sign and -2 if there is no common sign  
    450         * This function bring the same information than getCommonSign() with three parameters except it does not seek a special component 
    451         * @param noAxis an interger value indicating the dimension on which the sign must be analyzed 
    452         * @param cfixedGraph a reference to the graph on which the sign must be analyzed 
    453         */ 
    454         int getCommonSign(int noAxis,  myGraphType& fixedGraph); 
    455  
    456         /** 
     449        /** 
     450        * Function that get the axis sign for the dimension "noDim"  in the graph "currentGraph" 
     451        * return 0 if there is no edges, -1 or 1 if there is a common sign and -2 if there is no common sign  
     452        * This function bring the same information than getCommonSign() with three parameters except it does not seek a special component 
     453        * @param noAxis an interger value indicating the dimension on which the sign must be analyzed 
     454        * @param cfixedGraph a reference to the graph on which the sign must be analyzed 
     455        */ 
     456        int getCommonSign(int noAxis,  myGraphType& fixedGraph); 
     457 
     458        /** 
    457459        * Function that get the axis sign for the dimension "noFree" in the graph "currentGraph" 
    458460        * return 0 if there is no edges, -1 or 1 if there is a common sign and -2 if there is no common sign  
     
    472474 
    473475 
    474         // -- Functions that create the hidden file and populate the order Table by reading the data structures --  
     476        // -- Functions that create the hidden file and populate the order Table by reading the data structures --  
    475477 
    476478       /* 
     
    482484        void readParam(int noAxis, int valAxis, int noParam); 
    483485 
    484         /** 
     486        /** 
    485487        * Function that perform the reading of all the order statement the same way that in the read() function  
    486488        * The difference is that, as the first and second axis are dummies, just one component of the 3D components vector  
     
    489491        * for the axis number that have an offset because axis "k" is in reality "i" (cf. to3D() function).  
    490492        */ 
    491         void read1D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
    492  
    493         /** 
     493        void read1D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
     494 
     495        /** 
    494496        * Function that perform the reading of all the order statement the same way that in the read() function  
    495497        * The difference is that, as the first axis is dummy, just one component of the 3D components vector is considered. 
     
    497499        * for the axis number that have an offset because "j" and "k" axis are in reality "i" and "j" axis (cf. to3D() function).  
    498500        */ 
    499         void read2D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
    500  
    501         /**  
     501        void read2D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
     502 
     503        /**  
    502504        * Function that read the three structures ("outerComp", "middleComp" and "innerComp") then display all the order  
    503505        * statement accordignly to the values read in the "cfcSign" attributes of the components structures  
     
    509511        * read them and the moduls from the 1D component vector (innerComp). 
    510512        */ 
    511         void read3D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
    512  
    513         // -- Functions that display data structures --  
    514  
    515         /** 
     513        void read3D(cfcStructTableType outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
     514 
     515        // -- Functions that display data structures --  
     516 
     517        /** 
    516518        * Function that show vertices and edges of a graph and their attributes 
    517519        * @param currentGraph a reference to the graph on which informations have to be shown 
    518520        */ 
    519         void showGraph(myGraphType& currentGraph, myGraphType& myGraph); 
    520  
    521         /** 
     521        void showGraph(myGraphType& currentGraph); 
     522 
     523        /** 
    522524        * Function that show the 3D components vector 
    523525        * Informations displayed are the "cfcSign" attributes (axis number and axis direction) 
     
    525527        void showOuter(cfcStructTableType& outerComp); 
    526528 
    527         /** 
     529        /** 
    528530        * Fonction permettant de visualiser le tableau de vecteurs contenant les composantes à 2 dimensions   
    529531        * Funtion that show the array of 2D components vectors  
     
    534536        void showMiddle(int noFixed1, cfcStructTableType& outerComp, middleCompType& middleComp, myGraphType& myGraph); 
    535537 
    536         /** 
     538        /** 
    537539        * Fonction permettant de visualiser le tableau de vecteurs contenant les composantes à une dimension 
    538540        * Function that show the array of 1D components vectors  
     
    545547        void showInner(int noFixed1, int noFixed2, int freeDim, cfcStructTableType& outerComp, middleCompType& middleComp, innerCompType& innerComp, myGraphType& myGraph); 
    546548 
    547         // -- Tool functions --  
    548  
    549         /** 
     549        // -- Tool functions --  
     550 
     551        /** 
    550552         * Function for getting the index number of the module which name is given as a parameter (tool function). 
    551553         * @param mod a string containing the modul name. 
     
    554556         * @return an index on the modul number.  
    555557         */ 
    556         int getModulIndex(string mod, const vector<string>& tab, int index); 
    557  
    558         /* 
    559         * Function that allow to see what is inside the orderTable given as a parameter 
    560         * This function is just usefull for testing the result of the generation, so it is temporary  
    561         * @param theOrderTable a reference to a vector of Order objects  
    562         */ 
    563         void showTokens(Table<Order>& theOrderTable);  
    564  
    565         /* 
    566         * Check if a modul is integrated in an order statement 
    567         * Function added since isCounterOrder() seems to have changed its behavior 
    568         * @param nom the name of the modul that have to be seeked  
    569         * @param theOrderTable a reference on the order table in which the modul has to be seeked 
    570         * @return a boolean value set to true if the module if the modul is integrated in an order statement 
    571         */ 
    572         bool isInOrder(string nom, Table<Order>& theOrderTable); 
    573          
     558        int getModulIndex(string mod, const vector<string>& tab, int index); 
     559 
     560        /* 
     561        * Function that allow to see what is inside the orderTable given as a parameter 
     562        * This function is just usefull for testing the result of the generation, so it is temporary  
     563        * @param theOrderTable a reference to a vector of Order objects  
     564        */ 
     565        void showTokens(Table<Order>& theOrderTable); 
     566 
     567        /* 
     568        * Check if a modul is integrated in an order statement 
     569        * Function added since isCounterOrder() seems to have changed its behavior 
     570        * @param nom the name of the modul that have to be seeked  
     571        * @param theOrderTable a reference on the order table in which the modul has to be seeked 
     572        * @return a boolean value set to true if the module if the modul is integrated in an order statement 
     573        */ 
     574        bool isInOrder(string nom, Table<Order>& theOrderTable); 
     575 
    574576 
    575577 
Note: See TracChangeset for help on using the changeset viewer.