Changeset 194
- Timestamp:
- 02/10/10 11:48:12 (14 years ago)
- Location:
- trunk/yao
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/YAOObjects/Order.cpp
r189 r194 719 719 // --------------------------------------------------------------------------------------------------------------------------------------------------------- 720 720 721 for(int i = 0; i < outerComp.size(); i++) for(int j = 0; j < middleComp[i][0].size(); j++) for(int k = 0; k < innerComp[i][0][j][1].size(); k++) Read1D(k); 722 723 // showCompSize(); 721 read1D(); 724 722 725 723 break; … … 745 743 // ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 746 744 747 for(int i = 0; i < outerComp.size(); i++) for(int j = 0; j < middleComp[i][0].size(); j++) Read2D(j); 748 749 // showCompSize(); 745 read2D(); 750 746 751 747 break; … … 766 762 // -------------------------------- 767 763 768 for(int i = 0; i < outerComp.size(); i++) Read3D(i);764 read3D(); 769 765 770 766 setMacroGraph(); … … 2388 2384 2389 2385 2390 2391 2392 2393 2394 2395 2396 void Order::Read1D(int noComp1D) { 2397 2398 2399 // Get the axis number (the component value in 3D and 2D are the same and the axis numbers are 0 (i) and 1 (j) 2400 // ----------------------------------------------------------------------------------------------------------- 2401 2402 // ****** int noAxis1 = innerComp[0][0][0][1][noComp1D].cfcSign[0].first; 2403 2404 // Get the axis value : the component Id in 3D and 2D is zero and the axis numbers is 2 (k) 2405 // ---------------------------------------------------------------------------------------- 2406 2407 int valAxis1 = innerComp[0][0][0][1][noComp1D].cfcSign[0].second; 2408 2409 // Read the order parameter for the 0 axis number (i dimension) 2410 // ------------------------------------------------------------ 2411 2412 readParam(0, valAxis1, 1); 2413 2414 // ********* readParam(noAxis1 -2, valAxis1, 1); 2415 2416 cout << endl << endl << "\t\t"; 2417 2418 // For all moduls embedded in the 1D component "noComp1D" given as parameter 2419 // ------------------------------------------------------------------------- 2420 2421 for(int noMod = 0; noMod < innerComp[0][0][0][1][noComp1D].embeddedModuls.size(); noMod++) { 2422 2423 // Display the modul name as they appear in the description file 2424 // ------------------------------------------------------------- 2425 2426 cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[0][0][0][1][noComp1D].embeddedModuls[noMod]) << " "; 2427 2428 } 2429 2430 // Close the order statement 2431 // ------------------------- 2432 2433 readParam(0, 0, 0); 2434 2435 }; 2436 2437 2438 void Order::Read2D(int noComp2D) { 2439 2440 // Get the axis number (dimension) and the axis value for the first axis crossed in the order statement (the 3D component is zero) 2441 // ------------------------------------------------------------------------------------------------------------------------------- 2442 2443 int noFixed1 = middleComp[0][0][noComp2D].cfcSign[0].first; int valFixed1 = middleComp[0][0][noComp2D].cfcSign[0].second; 2444 2445 // Get the axis number (dimension) and the axis value for the second axis crossed in the order statement (the 3D component is zero) 2446 // --------------------------------------------------------------------------------------------------------------------------------- 2447 2448 int noAxis2 = middleComp[0][0][noComp2D].cfcSign[1].first; int valAxis2 = middleComp[0][0][noComp2D].cfcSign[1].second; 2449 2450 // Read the order parameter for this axis dimension and this axis value 2451 // --------------------------------------------------------------------- 2452 2453 readParam(noFixed1 -1, valFixed1, 1); 2454 2455 // If the second axis value is defined in the 2D component graph 2456 // ------------------------------------------------------------- 2457 2458 if(valAxis2 != 2) { 2459 2460 // Read the order parameter for this axis dimension and this axis value from the 2D graph component 2461 // ------------------------------------------------------------------------------------------------ 2462 2463 readParam(noAxis2 -1, valAxis2, 2); 2464 2465 cout << endl << endl << "\t\t"; 2466 2467 // For all 1D graphs embedded inside the 2D graph (component) 2468 // ---------------------------------------------------------- 2469 2470 for(int noComp1D = 0; noComp1D < innerComp[0][0][noComp2D][noAxis2].size(); noComp1D++) { 2471 2472 // For all moduls embedded in the 1D graph 2473 // --------------------------------------- 2474 2475 for(int noMod = 0; noMod < innerComp[0][0][noComp2D][noAxis2][noComp1D].embeddedModuls.size(); noMod++) { 2476 2477 // Display the modul name as it appears in the description file 2478 // ------------------------------------------------------------ 2479 2480 cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[0][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 2481 2386 void Order::read1D() { 2387 2388 // For all the components embedded in the 3D graph 2389 // ----------------------------------------------- 2390 2391 for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 2392 2393 // For all the components embedded in the 2D graph coming from the current 3D component 2394 // ------------------------------------------------------------------------------------ 2395 2396 for(int noComp2D = 0; noComp2D < middleComp[noComp3D][0].size(); noComp2D++) { 2397 2398 // For all the components embedded in the 1D graph coming from the current 2D component 2399 // ------------------------------------------------------------------------------------ 2400 2401 for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][1].size(); noComp1D++) { 2402 2403 // Getting the value of the third axis (no need to get the number of the axis as there is only one) 2404 // ------------------------------------------------------------------------------------------------ 2405 2406 int valAxis1 = innerComp[noComp3D][0][noComp2D][1][noComp1D].cfcSign[0].second; 2407 2408 // Read the order paramater for this axis value (axis number and parameter number are fixed as there is just one dimension) 2409 // ------------------------------------------------------------------------------------------------------------------------ 2410 2411 readParam(0, valAxis1, 1); 2412 2413 cout << endl << endl << "\t\t"; 2414 2415 // For all the modules embedded in the current 1D component 2416 // -------------------------------------------------------- 2417 2418 for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls.size(); noMod++) { 2419 2420 // Insert the modules after the paramaters 2421 // --------------------------------------- 2422 2423 cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][1][noComp1D].embeddedModuls[noMod]) << " "; 2424 2425 } 2482 2426 } 2483 2427 } 2484 2428 } 2485 2429 2486 // If the second axis value is not defined in the 2D component graph 2487 // ----------------------------------------------------------------- 2488 2489 else { 2490 2491 // For all 1D graphs embedded inside the 2D graph (component) 2492 // ---------------------------------------------------------- 2493 2494 for(int noComp1D = 0; noComp1D < innerComp[0][0][noComp2D][noAxis2].size(); noComp1D++) { 2495 2496 // Get the axis number (dimension) for the second axis crossed in the order statement (information readen from the 1D graph component) 2497 // ----------------------------------------------------------------------------------------------------------------------------------- 2498 2499 noAxis2 = innerComp[0][0][noComp2D][noAxis2][noComp1D].cfcSign[0].first; 2500 2501 // Get the axis value for the second axis crossed in the order statement (information readen from the 1D graph component) 2502 // ----------------------------------------------------------------------------------------------------------------------- 2503 2504 valAxis2 = innerComp[0][0][noComp2D][noAxis2][noComp1D].cfcSign[0].second; 2505 2506 // Read the order parameter for this axis dimension and this axis value 2507 // -------------------------------------------------------------------- 2430 // Close the order statement 2431 // ------------------------- 2432 2433 readParam(0, 0, 0); 2434 2435 }; 2436 2437 2438 2439 void Order::read2D() { 2440 2441 2442 // For all the components embedded in the 3D graph 2443 // ----------------------------------------------- 2444 2445 for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 2446 2447 // For all the components embedded in the 2D graph coming from the current 3D component 2448 // ------------------------------------------------------------------------------------ 2449 2450 for(int noComp2D = 0; noComp2D < middleComp[noComp3D][0].size(); noComp2D++) { 2451 2452 // Getting the axis number of the parameter 2453 // ---------------------------------------- 2454 2455 int noFixed1 = middleComp[noComp3D][0][noComp2D].cfcSign[0].first; 2456 2457 // Getting the axis value of the parameter 2458 // --------------------------------------- 2459 2460 int valFixed1 = middleComp[noComp3D][0][noComp2D].cfcSign[0].second; 2461 2462 // Read the order paramater for this axis number and this axis value (axis number is decreased as there is just two dimensions : the second axis become the first one) 2463 // ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2464 2465 readParam(noFixed1 -1, valFixed1, 1); 2466 2467 // Getting the axis number of the remaining parameter 2468 // -------------------------------------------------- 2469 2470 int noAxis2 = middleComp[noComp3D][0][noComp2D].cfcSign[1].first; 2471 2472 // Getting the axis value of the remaining parameter 2473 // ------------------------------------------------- 2474 2475 int valAxis2 = middleComp[noComp3D][0][noComp2D].cfcSign[1].second; 2476 2477 // If the third axis value is defined inside the current 2D component 2478 // ------------------------------------------------------------------ 2479 2480 if(valAxis2 != 2) { 2481 2482 // Read the order paramater for this axis number and this axis value (axis number is decreased as there is just two dimensions : the third axis become the second one) 2483 // ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2508 2484 2509 2485 readParam(noAxis2 -1, valAxis2, 2); 2510 2486 2511 // For all moduls embedded in the 1D graph 2512 // --------------------------------------- 2513 2514 for(int noMod = 0; noMod < innerComp[0][0][noComp2D][noAxis2][noComp1D].embeddedModuls.size(); noMod++) { 2515 2516 // Display the modul name as it appears in the description file 2517 // ------------------------------------------------------------ 2518 2519 cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[0][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 2520 2487 cout << endl << endl << "\t\t"; 2488 2489 // For all the components embedded in the 1D graph coming from the current 2D component 2490 2491 for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][noAxis2].size(); noComp1D++) { 2492 2493 // For all the modules embedded in the current 1D component 2494 // -------------------------------------------------------- 2495 2496 for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls.size(); noMod++) { 2497 2498 // Insert the moduls after the parameters 2499 // -------------------------------------- 2500 2501 cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 2502 2503 } 2521 2504 } 2505 } 2506 2507 // If the third axis value is not defined inside the current 2D component 2508 // ---------------------------------------------------------------------- 2509 2510 else { 2511 2512 // For all the components embedded in the 1D graph coming from the current 2D component 2513 // ------------------------------------------------------------------------------------ 2514 2515 for(int noComp1D = 0; noComp1D < innerComp[noComp3D][0][noComp2D][noAxis2].size(); noComp1D++) { 2516 2517 // Getting the axis number of the remaining parameter 2518 // -------------------------------------------------- 2519 2520 noAxis2 = innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].cfcSign[0].first; 2521 2522 // Getting the axis value of the remaining parameter 2523 // ------------------------------------------------- 2524 2525 valAxis2 = innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].cfcSign[0].second; 2526 2527 // Read the order paramater for this axis number and this axis value (axis number is decreased as there is just two dimensions : the third axis become the second one) 2528 // ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2529 2530 readParam(noAxis2 -1, valAxis2, 2); 2531 2532 cout << endl << endl << "\t\t"; 2533 2534 // For all the modules embedded in the current 1D component 2535 // -------------------------------------------------------- 2536 2537 for(int noMod = 0; noMod < innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls.size(); noMod++) { 2538 2539 // Insert the moduls after the parameter 2540 // ------------------------------------- 2541 2542 cout << boost::get(boost::vertex_name_t(), myGraph, innerComp[noComp3D][0][noComp2D][noAxis2][noComp1D].embeddedModuls[noMod]) << " "; 2543 2544 } 2545 } 2546 } 2522 2547 } 2523 2548 } … … 2528 2553 readParam(0, 0, 0); 2529 2554 2530 }; 2531 2532 2533 void Order::Read3D(int noComp3D) { 2555 }; 2556 2557 2558 2559 2560 2561 void Order::read3D() { 2562 2563 2564 // For all the components embedded in the 3D graph 2565 // ----------------------------------------------- 2566 2567 for(int noComp3D = 0; noComp3D < outerComp.size(); noComp3D++) { 2534 2568 2535 2569 // Get the axis number (dimension) and the axis value of the first axis crossed in the order statement … … 2773 2807 } 2774 2808 } 2809 2810 } 2775 2811 2776 2812 // Close the order statement -
trunk/yao/src/YAOObjects/Order.hpp
r189 r194 482 482 483 483 /** 484 * Function that perform the reading of all the order statement the same way that in the Read() function484 * Function that perform the reading of all the order statement the same way that in the read() function 485 485 * The difference is that, as the first and second axis are dummies, just one component of the 3D components vector 486 486 * and one component of the 2D components vector (for the first axis as fixed dimension) are considered. 487 * The true reading begins from the 1D components vector the same way than for the Read() funtion except487 * The true reading begins from the 1D components vector the same way than for the read() funtion except 488 488 * for the axis number that have an offset because axis "k" is in reality "i" (cf. to3D() function). 489 * @param noComp1D an interger value indicating from which 1D component the order statement have to be read 490 */ 491 void Read1D(int noComp1D); 492 493 /** 494 * Function that perform the reading of all the order statement the same way that in the Read() function 489 */ 490 void read1D(); 491 492 /** 493 * Function that perform the reading of all the order statement the same way that in the read() function 495 494 * The difference is that, as the first axis is dummy, just one component of the 3D components vector is considered. 496 * The true reading begins from the 2D components vector the same way than for the Read() funtion except495 * The true reading begins from the 2D components vector the same way than for the read() funtion except 497 496 * for the axis number that have an offset because "j" and "k" axis are in reality "i" and "j" axis (cf. to3D() function). 498 * @param noComp2D an interger value indicating from which 2D component the order statement have to be read 499 */ 500 void Read2D(int noComp2D); 497 */ 498 void read2D(); 501 499 502 500 /** … … 509 507 * If informations on the third axis can not be found in the 3D component vector or in the 2D component vector, 510 508 * read them and the moduls from the 1D component vector (innerComp). 511 * @param noComp3D an integer value indicating from which 3D component the order have to be read 512 */ 513 void Read3D(int noComp3D); 509 */ 510 void read3D(); 514 511 515 512 /**
Note: See TracChangeset
for help on using the changeset viewer.