Manipulation of the table with the recurrence

I have a 2D chart which is similar to an adjacency matrix.  The table contains information that I need to analyze following a set of simple rules, but I'm unable to implement them.  Here is a simple example of the table (I would like to get the simple example job, and then expand as needed to work with the greatest examples).  The table is a table of 6 x 6 and the columns contain information about a procedure of transition between nodes in a map.  There is a root column (column we will begin by) and there are sheet columns, columns, we strive to achieve by browsing through other nodes in the graph (other columns in the table).  In the example below there is that a single root and a leaf, root is column zero and the leaf column 6 (I chose the marking of the nodes so that the zero column would be the root and column 6 would be the leaf but it doesn't have to be the case and I'm writing the software so that it is not dependent on the labelling of the map).  Outside the entrance to 2D table, there will be an array of column headers that maps the label of node to the right column of the table, a table of leaves and a digital control for the root.  That's what I try to do, refer to the image below.

I look at the root and see that this is node 1, the column header looking I see that node 1 is column zero of my table.  I start with the line 0 in column 0 (the root column) and work my way down looking for integers not dummies.  I'm a rank, then see the integer 2, that tells me that I need to move the column 1 of the table (because the column 2 header) and store the integer 2.   I start with row 0 column and work my way down looking for integers not dummies.  I just rank 2 and see integer 3, that tells me that I have to move to column 2 of the table (column 2 header 3) and store the integer 3 (while I now [1,2,3] as my path I'll build).  I start at line 0 in column 2 and work my way down looking for integers no dummies and come in the 4th row is Integer 5, it tells me that I have to move to column 4 of the table (because the column 4 has 5 header) and store the integer while I [1,2,3,5] as my way.  I start at line 0 in column four and work my way down looking for an integer not null and come 5th see 6, because integer integer 6 is my current journal (only sheet for this example) I stop and have a path from node 1 to node 6 [1,2,3,5,6].  I didn't even though (and this is the part that gives me bad) because the column 1 (node 2 header) had another line nonzero, rank 3, which contains integer 4.  I need to repeat the process from here, give me a second track of [1,2,4,5,6].

You can see how this will get very complex when I have several columns with several lines non-zero.  This seems to be a good case for use recursion, but I can't write the code to do this.  In the end, I need to find all the ways to get from the root to the leaf, as I said that there is more than one sheet in most of the cases.  Having many Leafs should not be a problem because I can repeat the same process for each leaf.  I have attaced a VI in 8.0 which has berries that I work with, according to the picture above.  I would like ideas on how to achieve this, as I refuse to do it by hand for great examples when I should be able to easily automate this process.

Concerning

This version fixes two problems I mentioned - one was caused by the queues the starting point outside the loop (a legacy of my original idea), the other to not deal with the final loop iteration when there is nothing in the queue (fixed with an additional business structure).  You need is a graph (that is to say, have links back and forward)?  Otherwise you could do a little more efficient with a directed graph, by removing the link from 2 to 1, 3 and 4 to 2, etc.

Tags: NI Software

Similar Questions

  • How to display the note for a cell of table with javascript?

    My goal is to do it with javascript. No manipulation of the side server.

    < af:table id = "t1" >
    < af:column id = "c1" >
    < af:outputText id = "ot1" >...
    < af:clientListner ...method="showpopup"/ >
    < /... >
    < /... >
    < /... >

    ....

    < af:popup id = "p1" >
    < af:noteWindow id = ot2 >
    here to show the value of ot1
    < /... >
    < /... >


    function showPopup (e) {}
    var text is e.getSource () .getValue ();.
    var popup is e.getSource (.findComponent("::p1"));.
    now, how to upgrade the content of the notewindow?
    Popup.Show ();
    }

    Hello

    You can try with something like that.

                   
                        
                    
    
                    
                        
                            
                        
    
                    
                    
                        function showPopup(evt){
                            var ot1 = AdfPage.PAGE.findComponent("ot1");
                            var text=ot1.getValue();
                            var popup=AdfPage.PAGE.findComponent("p1");
                            var ot2=AdfPage.PAGE.findComponent("ot2");
                            ot2.setValue(text);
                            popup.show();
    
                            }
    
                    
    

    Arun-

  • kindly tell how to use the unique value of a table with the index 0

    kindly tell how to use the unique value of a table with the index 0

    Hi
     
    Yep, use Index Array as Gerd says. Also, using the context help ( + h) and looking through the array palette will help you get an understanding of what each VI does.
     
    This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
     
    -CC
  • 'For' loop with a different number of iterations. Second, the auto-indexation of the tables with different sizes is done. It can affect the performance of the Vi?

    Hello

    I have a loop 'for' which can take different number of iterations according to the number of measures that the user wants to do.

    Inside this loop, I'm auto-indexation four different 1 d arrays. This means that the size of the tables will be different in the different phases of the execution of the program (the size will equal the number of measures).

    My question is: the auto-indexation of the tables with different sizes will affect the performance of the program? I think it slows down my Vi...

    Thank you very much.

    My first thought is that the compiler to the LabVIEW actually removes the Matlab node because the outputs are not used.  Once you son upward, LabVIEW must then call Matlab and wait for it to run.  I know from experience, the call of Matlab to run the script is SLOW.  I also recommend to do the math in native LabVIEW.

  • Fill the table with the formula nodewith a line of code

    Hello

    This is my first post of the community, OR maybe this question has been asked 1000 times but I could find no answer.

    Before using LabView I used Matlab a lot. I find a bit that it's too complicated without reason sometimes in labview work with arrays.

    I inherited, and I'm doing a little cleaning. what it does is extractr 2 and 3 position and creates a new table with her and another oner with other elements of the first table. In my view, that he becomes confused because you should rely on the cell of the table, the position of the output and I didn't wat to work this way.

    I replaced it with a knot of formula. Here is the code

    The departure is FP, the table of 6 elements is mdot and the 2 elements array is press

    MDOT float64 [6], press [2];

    MDOT [0] = FP [0]; MDOT [1] = FP [1];
    MDOT [2] = FP [4]; MDOT [3] = PS [5];
    MDOT [4] = PS [6]; MDOT [5] = FP [7];

    Press [0] = PS [2], press [1] = PS [3];

    Now, I want to know if it is possible to do as I would in matlab or C, where you can create a table with one line of code. What would the syntax in formula node to do something like:

    MDOT [6] = [FP [0], FP [1], [4] of FP, FP [5], FP [6], FP [7]];

    Press [2] = [FP [2], FP [3]];

    Thank you

    Use remove the table.  You can provide an index and length of elements to remove.  One of the outputs will be the original with the subset of the deleted table and the other output is the subset deleted.  1 NŒUD!

    EDIT: Created a snippet just after my previous post.

  • implementation of the table with the scroll bar. (data scrolling)

    Hello

    I want to show the web service data in the table with scroll bar using java script or html or css .actuall I want only a part of the screen is not whole screen scrollable. can you suggest how it is possible.any suggestion? I used phone gap technology. I used iscroll but it does not work in blackberry data are not displayed in the Simulator... Help, please

    Thank you

    ravi1989 wrote:

    Hello

    I want to show the web service data in the table with scroll bar using java script or html or css .actuall I want only a part of the screen is not whole screen scrollable. can you suggest how it is possible.any suggestion? I used phone gap technology. I used iscroll but it does not work in blackberry data are not displayed in the Simulator... Help, please

    According to devices/operating systems that you want to support, you could give bbUI.js a change. It works really well in most of the cases, and I think there are a lot of things you don't need to worry more because bbUI.js is just for you.

    Look more at the scrollPanel example that does exactly what it takes, a part only of the entire screen of scrolling you can configure a height in the HTML source code directly.

  • Table with fixed header and the left column

    I created a table in my application with the fixed left column (left most column is fixed and remaining columns are scrolling from left to right). is it possible to create a table with fixed position and fixed left column?

    Suppose there are 50 rows and 10 columns in my paintings, and only 3 columns and 15 rows are visiable on the screen

    (1) when the user scroll left to right left only most of the columns must be fixed. Remaining cap of the table and column scroll left to right and vice versa. also

    (2) when user scroll high high bottems single topic most must be fixed and remaining all lines (with to the left most column) should be scrollable.

    I am able to put in place a point at the top, but not both. Please suggest

    "If I repopulate the value in the cell when user scrolling, shell, I get scrolling effect correctly as it only shows half cell when the user highlight half of the cell."

    Approach using TablelayoutManager display single cells and scrolling would be cell at a time.  And Yes, you will need to override navigationMovement and n of methods appropriate TouchEvent your TableLayoutManager so that he knows when to fill the cells.

    Another alternative is to have four managers, we don't the the upper left corner (the dead angle), one to make the top row (column headings), one to make the left column (row headings), and the other to do the rest (data).  Place all these in a delicate header and line manager.  Only allow the user to scroll the data part.  Have the difficult Manager to listen the scroll events.  Then have the wily Manager add and remove the dummy column and header line managers as appropriate.  Note that these topic fields would not good passes, they would be either there or they would not be displayed. That would give you your 1/2 a scroll of the cell.  And you wouldn't have to substitute anything to detect movement, you would have left the listener do scrolling for you.

  • AF:table with Pagination. How to get to the specific page?

    Hi all!

    I use jDev 12.1.3

    I have the following case, based on the Employees of HR schema table.

    In a stubborn workflow, I have 2 pages.

    The 1era page has a read-only table with the employees. The peculiarity is that the instance of the opinion of the employees is tuned with Page Ranging (lazy employees is a huge table).

    Af: table has autoHeightRows = "15" scrollPolicy = 'page' and the iterator has RangeSize = 15.

    By clicking on a button, the user goes to the second page, where the selected record should be changed (with the help of the SetCurrentRowWithKey method). Then, the user wants to go back to the first page.

    The question starts here.

    Assume that the user is on the page with the table and wants to change an employee who is on the page of the 3rd (paging) of the table. After the change of registration, the user wants to return back to the page 'table', but not on the first page (of the paging), but 3rd page.

    So, how I put the current page and the return line to the initial selection of the user?

    I ' tried scrollToRangePage() but nothing seems to happen.

    Thank you very much

    ~ Apostolos

    You can do it if you save the page the row is turned on, or the beginning of the beach page. Her edit you the line and after you have finished editing, you set the rear range.

    To set a table on a specific page, you use a RangeChangeEvent where you specify the table, oldstart, oldend, newstat index values and newend.

    Before you begin to modify or end edit, you can calculate the values of the iterator. Something like

    {} public void onGotoPage (ActionEvent actionEvent)

    BindingContainer bindingContainer is BindingContext.getCurrent () .getCurrentBindingsEntry ();.

    get the number of page to goto

    AttributeBinding attr = bindingContainer.getControlBinding("gotopage1") (AttributeBinding);

    Entire NewPage = (Integer) attr.getInputValue ();

    If (newPage == null) {}

    return;

    }

    first page starts at index 0 so subtract 1 from the number of page

    -newPage;

    DCIteratorBinding iter = bindingContainer.get("EmployeesView1Iterator") (DCIteratorBinding);

    calculate the old and new rage for the RangeChangeEvent

    range int = iter.getRangeSize (); Note both the table and we take the RangeSize of the iterator page size

    int oldStart = iter.getRangeStart ();

    int oldEnd = oldStart + Beach;

    Newstat int newPage = * rank;

    int newEnd = Newstat + range;

    Find the table

    UIViewRoot iViewRoot is FacesContext.getCurrentInstance () .getViewRoot ();.

    UIComponent table = iViewRoot.findComponent("t1");

    create the event and fire

    Event RangeChangeEvent = new RangeChangeEvent (table, oldStart, oldEnd, Newstat, newEnd);

    table. Broadcast (Event);

    Update table

    AdfFacesContext.getCurrentInstance () .addPartialTarget (table);

    }

    I've marked the essential parts "BOLD".

    Timo

  • Can fill us transitional attribute in the table with no serial like 1,2,3, etc.? And how?

    Mr President.

    Can fill us transitional attribute in the table with no serial like 1,2,3, etc.? And how?

    Concerning

    You want to show serial No. on the page for all the lines?

    Check once-

    Blog of Ashish Awasthi (Jdev/ADF): Add the serial number to the table of the ADF, column to auto-increment in the table to the ADF

    Actually transitional attribute loses its value when page refreshes or viewObject is not appropriate in this case if your use case is different, so please tell us

    Ashish

  • LOV cascading if I don't have only one table with the customer name and the name of the product in the ADF.

    Hi Please help me how to use cascade, if I don't have only one table with the customer name and the name of the product in the ADF... I use Jdeveloper 11.1.

    For the client, I used customer VO with client list to fill but to populate the product that I use bind variable PrODUCT_NAME select distinct from TABLE where client_name =: bindCustomer

    so first of all, I need to set the variable of liaison on behalf of the selected customer.

    Can you please tell me how to set this variable binding in this case.

    After you set the LOV to your product attribute, correspondting VO in the LOV will appear under view accessors.

    Change the accessor of the view, you will see the variable binding. Set its value to the customer field of the parent object.

    Visit this link: https://www.youtube.com/watch?v=nXwL2_RP7AQ

    Kind regards

    Elias.

  • Huge table with PDF (1.4 TB) be stored outside the database

    We have a table with BLOB where a PDF one stored. Now, we want to bring these data from the database (backup reaseans etc..).

    Any solution? Maybe a total another data store - stuff 'BIG DATA '?

    Thanks - regards

    Oliver

    If some give me a solution for a way to store PDF files outside the database.

    If you want to store the PDF file outside the database, then there are usually two approaches.

    (1) in the database, there is a table that stores the name of the file and the location on disk of the PDF. The written application the PDF file in the file system and then updates the database with the location and the name of this PDF file. If the application must Access the PDF, it looks up info in the database and then retrieve this file. The application must be able to read and write to the disk outside the database.

    (2) use such BFILE as mentioned previously.

    In both cases, your PDF documents is stored outside the database, but in my opinion, this does not eliminate the need for backups. If these PDF are lost, and there is no backup, then the data are lost. Because its outside of the database, a database backup backs up only data. The backup may be different and however different backup method is used. But I've seen cases where the db backup was performed at a given time and the binary backup was done at another time and restoration, there were inconsistencies that needed reconciliation.

    HTH,
    Brian

  • I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.

    I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.

    as

    ID |   City

    ---------------------------

    1     |  Delhi

    ----------------------------

    2     |  Hyderabad

    Now, I have to update Delhi and Hyderabad Hyderabad with Delhi.

    How to do this?

    Hi Indi,

    (1) why do you want what it? Requirements of companies?

    (2) how much these values you want to reverse? Is it only "Delhi" and "Hyderabad", or there is a list, or other logic?

    Update your_table

    Set city = decode (lower (city), 'delhi', 'Hyderabad', 'hyderabad', 'Delhi')

    where lower (city) ('Delhi', 'hyderabad');

    Does that help?

  • How to get the title of a table with FDK?

    How to get the title of a table with ad FDK C++?

    I did people. I get objects table paragraph and later the textual elements for each of them.

  • How to update exists column on the table with the exact number and auto increment

    Hello

    I have a table with more than 10 million rows and there is a column called 'number_zaq', I want to update this column on line frist from 2000 and + 1 for the next all ranks.

    Update your_table

    Set number_zaq = rownum + 2000-1;

  • External table with the preprocessor file to display the list of files

    Hello

    in my db 11.2.0.2 I would create an external table with script preprocessor to show me the list of files in a directory.

    Preprocessor banally:

    #! / bin/bash

    CD/MyDir

    / bin/ls-l *.txt 2 >/dev/null

    The problem is the file name that contains white space (style windows in a Linux env), for ex:

    -rw - r - r - 1 oracle oinstall 920 9 Jun 17:37 File1.txt

    -rw - r - r - 1 oracle oinstall 72316 Jun 10 10:37 file GC output1.txt

    -rw - r - r - 1 oracle oinstall 72316 Jun 10 10:40 GC file output2.txt

    So I can't use FIELDS DELIMITED BY "". ""

    FIXED size? No, because the file size change the length of the lines.

    I tried to use awk in my preprocessos script, but I have the same problem:


    / bin/ls-l *.txt 2 >/dev/null | / bin/awk ' {printf "%s %.2d %s %s\n", $6, $ 7, $ 8, $9} '.


    Any ideas?

    Hello

    I used java to retrieve information about the files.

  • I want to change the table with the expression of dangerousness of the virtual columns with her, need advice

    Hi all

    Here is the structure of the table with two expression of virtual columns associated highlighted, now I want to delete these expressions with virtual columns (but must keep my VIRTUAL columns as it is).

    Is it possible the alter or I need to raise the table, make a new structure and copy content back to newly structured table... Pleae help!

    CREATE TABLE TEST_COL)

    SAGE_TRADE_TYPE VARCHAR2 (50 BYTE),

    LOCAL_TZ VARCHAR2 (20 BYTE),

    ACE GMT_CONV_ENTERED_DT_TS (SAGEDBO. FN_CONVERT_TIMEZONE (LOCAL_TZ, ENTERED_DT_TS)) VIRTUAL,.

    ACE GMT_CONV_EXECUTION_DT_TS (SAGEDBO. FN_CONVERT_TIMEZONE (LOCAL_TZ, UPSTREAM_EXECUTION_TS)) VIRTUAL,.

    EOD_IND VARCHAR2 (10 BYTE)

    );

    Thank you very much

    Arpit

    Try this

    ALTER table test_col change gmt_conv_entered_dt_ts (0) virtual;

    ALTER table test_col change gmt_conv_execution_dt_ts (1) virtual;

Maybe you are looking for