How usable is it to implement big Matrices in PL/SQL?

Hi there,
I'm implementing neural network Algorithms with Gradient Descend Methods in PL/SQL. The time for running the Algorithm (Backpropagation of Error) is very large - I still did my best for more Efficiency.
Now I'm thinking about implementing another Algorithm which is called 'Levenberg Marquardt' and that is said to be much more faster. But this Algorithm handles with very large Matrices, invertes and transposes them, needs to create a Jacobian Matrix -> has a big demand for memory
could anyone tell me how efficient it is to implement things like that in PL/SQL? Is there any use in trying it? Perhaps anybody who still worked with something like this?
Thanks in advance
~Mel

Well it's certainly possible in PL/SQL if that's the way you want to implement it...
SQL> ed
Wrote file afiedt.buf
  1  declare
  2    type t_x is table of number index by pls_integer;
  3    type t_y is table of t_x index by pls_integer;
  4    v_xy t_y;
  5  begin
  6    for y in 1..700
  7    loop
  8      for x in 1..700
  9      loop
10        v_xy(y)(x) := ((y-1)*700)+x;
11      end loop;
12    end loop;
13    dbms_output.put_line('y size: '||v_xy.count);
14    dbms_output.put_line('(123,567) = '||v_xy(123)(567));
15    dbms_output.put_line('(700,700) = '||v_xy(700)(700));
16* end;
SQL> /
y size: 700
(123,567) = 85967
(700,700) = 490000
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • How to find user exit implemented in the program

    how to find user exit implemented in the program or standerd transaction

    try this program to get the list of all the user exits for a transaction...
    *& Report  Z_USER_EXIT                                                 *
    *REPORT  Z_USER_EXIT                             .
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
      TABLES : tstc,     "SAP Transaction Codes
               tadir,    "Directory of Repository Objects
               modsapt,  "SAP Enhancements - Short Texts
               modact,   "Modifications
               trdir,    "System table TRDIR
               tfdir,    "Function Module
               enlfdir,  "Additional Attributes for Function Modules
               tstct.    "Transaction Code Texts
    *& Variables
      DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
      DATA : field1(30).
      DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
      SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
      SELECTION-SCREEN SKIP.
      PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
      SELECTION-SCREEN SKIP.
      SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
      START-OF-SELECTION.
    Validate Transaction Code
        SELECT SINGLE * FROM tstc
          WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
        IF sy-subrc EQ 0.
          SELECT SINGLE * FROM tadir
             WHERE pgmid    = 'R3TR'
               AND object   = 'PROG'
               AND obj_name = tstc-pgmna.
          MOVE : tadir-devclass TO v_devclass.
          IF sy-subrc NE 0.
            SELECT SINGLE * FROM trdir
               WHERE name = tstc-pgmna.
            IF trdir-subc EQ 'F'.
              SELECT SINGLE * FROM tfdir
                WHERE pname = tstc-pgmna.
              SELECT SINGLE * FROM enlfdir
                WHERE funcname = tfdir-funcname.
              SELECT SINGLE * FROM tadir
                WHERE pgmid    = 'R3TR'
                  AND object   = 'FUGR'
                  AND obj_name = enlfdir-area.
              MOVE : tadir-devclass TO v_devclass.
            ENDIF.
          ENDIF.
    Find SAP Modifactions
          SELECT * FROM tadir
            INTO TABLE jtab
            WHERE pgmid    = 'R3TR'
              AND object   = 'SMOD'
              AND devclass = v_devclass.
          SELECT SINGLE * FROM tstct
            WHERE sprsl EQ sy-langu
              AND tcode EQ p_tcode.
          FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
          WRITE:/(19) 'Transaction Code - ',
          20(20) p_tcode,
          45(50) tstct-ttext.
          SKIP.
          IF NOT jtab[] IS INITIAL.
            WRITE:/(95) sy-uline.
            FORMAT COLOR COL_HEADING INTENSIFIED ON.
            WRITE:/1 sy-vline,
            2 'Exit Name',
            21 sy-vline ,
            22 'Description',
            95 sy-vline.
            WRITE:/(95) sy-uline.
            LOOP AT jtab.
              SELECT SINGLE * FROM modsapt
              WHERE sprsl = sy-langu AND
              name = jtab-obj_name.
              FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
              WRITE:/1 sy-vline,
              2 jtab-obj_name HOTSPOT ON,
              21 sy-vline ,
              22 modsapt-modtext,
              95 sy-vline.
            ENDLOOP.
            WRITE:/(95) sy-uline.
            DESCRIBE TABLE jtab.
            SKIP.
            FORMAT COLOR COL_TOTAL INTENSIFIED ON.
            WRITE:/ 'No of Exits:' , sy-tfill.
          ELSE.
            FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
            WRITE:/(95) 'No User Exit exists'.
          ENDIF.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'Transaction Code Does Not Exist'.
        ENDIF.
    Take the user to SMOD for the Exit that was selected.
      AT LINE-SELECTION.
        GET CURSOR FIELD field1.
        CHECK field1(4) EQ 'JTAB'.
        SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
        CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

  • Technology P2P with JAVA (How can i do for implement this tech with JAVA B)

    Thanks for read this message,,, I will glad with you if you can help me...
    I would like desing, make, build, a point to point aplication with JAVA Builder, I have been reading about sockets but its not enought,,,,,,
    can you help me????
    Thanks

    Well , thanxs for take attention,,,
    I need some information about Point to Point tech because I would like to make an aplication with JAVA Builder...
    First step is to know how works the point to point...could you give me some links?
    Second step is to know how can I do for implement this tech?
    Third step is to know Is Java Builder the most indicate languaje for this aplication?
    Fourth step is - if Java Buider is the indicate tool, What have to know for make the aplication?
    Well,,I dont speak english very well but is the best that i can do?
    BYE

  • How many Interfaces can i implement?

    How many interfaces can i implement in one class??
    I have 2 different events and i want the same class to be a listener for both events generated from one class.

    Around 32,000 (although the class file has a 16 bit
    unsigned int for the number of interfaces, each
    needs a class info and the string in the constant
    pool, which is limited to 65,535 entries).So what's the runtime overhead of adding an interface?

  • How is Currency Translation Adjustment Implemented?

    Hi,
    How is currency translation adjustment implemented in SAP BPC 10.0? Is there any Business rule for it?
    Sincerely,
    Nicky

    Hi Nicky,
    Currency Translation is maintained from currency translation business rules from web client.
    You should enter your input from LC(Local currency) member of rate type dimension in the planning model. Then should create a data package which uses sap given currency translation process chain.
    Also you should maintain rates in rate type model which is used by planning model.
    According to the rates you have maintained in rate model, running data package in planning model will calculate from LC to the target currency(USD, EUR etc.)
    You maintain the target currency to be calculated in entity type dimension's FX property in the planning model. Also you should maintain RATETYPE property in the account type dimension of planning model as AVG or CLO for P&L and Assets-Liabilities-Equity members respectively,
    Maintain your package's logic script file as SAP standard process chain required.
    Hope these helps,
    Thanks,
    Mahir,

  • How can i develop and implement an enhancement iw39?

    how can i develop and implement an enhancement in standrad program . for example in iw39 in selection screen i have to add few moew fields . so any one guideme how to atchive it
    thanks & regards
    deepurd

    Hi Deepu
    1) Go to program RIAUFK20.
    2) Press the spiral button (ENHANCE)
    3) Right click on the enhancement point mentioned below (available at the end of selection details)
    ENHANCEMENT-POINT riaufk20_25 SPOTS es_riaufk20 STATIC .
    4) Go to Enhancement Implementation -> Create
    5) Create a new implementation
    6) Add your coding in the implementation created.
    Please use the same implementation at all the places in the code where you use an enhancement point.
    Hope it helps.
    Refer Source Code Enhancements - Part 5 of the Series on the New Enhancement Framework for more...
    Cheers
      neer

  • How 3D glasses effect is implemented (discuss in terms of programming)

    Hi All,
    I want to know how 3D glasses effect is implemented interms of programatically. like , when we apply this effect to some composition....
    1. Is there two cameras created for each view (left and right) in the composition
    2. Is there two files needed for testing 3D glasses
    3. How can we get the two image's pixel data or pixel information from AE SDK
    4. What happen when we set different 3D view (stereo pair, red Green LR, red Blue LR ..etc)
    5. What happen when we change convergence offset
    6. Is there any relation between convergence offset and camera(s)
    and so on. Lets say, if we have to develop this effect, then how can we do it or how can we implement it. Please discuss.

    ehem...
    the 3D glasses effect merely merges two pre-exsiting images into one image, in one of the various methods of presenting a 3D image to the viewer.
    by pre-existing i mean that it's ENTIRELY up to the user to create the two separate images.
    it doesn't create any cameras, nor does it create a 3D depth to a single image.
    the different setting on the 3D glasses effect are merely a choice of a technical way of displaying 3D.
    be it anaglyph, side by side or interlacing.
    the convergence offset changes the distance between the "eyes", and is used to adjust ill-created image pairs.
    there is a relation between camera and the convergence offset.
    if you didn't do the job correctly with the cameras, then you compensate with the offset.
    if you wish to create a "real" 3D-izer effect, you would need to render the comp from two different cameras.
    that was recently discussed here: http://forums.adobe.com/thread/608953?tstart=0
    even doing that doesn't solve the entire problem, as some elements in the comp come from external sources, and are ready made for one camera and not the other. (such as rendered elements from 3D)
    in such a case you'll need two separate comps, each containing the correct source footage, and not just one comp with two different cameras.
    to read the image data from any layer in the comp you should use a layer param along with PF_CHECKOUT_PARAM.
    that will give you the two pre-existing images.
    so now you could just the use existing 3D glasses effect...

  • How do I creaet Enhancement Implementations for multiple main programs?

    I need to implement an enhancement (ENHANCEMENT-SECTION buchen_03 SPOTS es_mm06ef0b_buchen INCLUDE BOUND.) in an include (MM06EF0B_BUCHEN) that is used by 2 different main programs (SAPLMEPO & SAPMM06E).
    When I create an implementation, it is created for a specific main program.
    How can I create an implementation that is executed irrespective of which main program calls the include?
    Thanks
    Rajeev Natarajan

    Hello,
    plaese apply my note 1020176.
    Read the note carefully. It is absolutly necessary to activate the object in the specified order when appling the note!
    Alternativly: Import SP12 when it is avialable.
    Best Regards
    Michael

  • How can we update data in LDAP server using PL/SQL.

    Hi,
    How can we update data in LDAP server using PL/SQL program.
    Is there any sample code for refrence.
    Thanks,
    Tarun

    Hi Justin,
    Thanks for your help. You got my correct requirements.
    Tim's example returning all the attributes of current user which is admin user. Please correct me if I am wrong.
    I have the following information:
    the admin user and password,server info , port and ldap_base for admin.
    I have uid and password for regular user, I am trying find the ldap_base for regular user, which may be different from adminuser.
    Please help me.
    Thanks,
    Edited by: james. on Jan 12, 2009 5:39 PM

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • How to read a whole text file into a pl/sql variable?

    Hi, I need to read an entire text file--which actually contains an email message extracted from a content management system-- into a variable in a pl/sql package, so I can insert some information from the database and then send the email. I want to read the whole text file in one shot, not just one line at a time. Shoud I use Utl_File.Get_Raw or is there another more appropriate way to do this?

    how to read a whole text file into a pl/sql variable?
    your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
    ....

  • How can I make my adodc connect faster to my SQL Server? It's taking a minute (so long) before I can view thousand of record in my listview.

    How can I make my adodc connect faster to my SQL Server? It's taking a minute (so long) before I can view thousand of record in my listview. Please anyone help me.
    I'm using this code:
    Public Class McheckpaymentNew
    Private cn As New ADODB.Connection
    Private rs As New ADODB.Recordset
    Private Sub McheckpaymentNew_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Try
    cn.ConnectionString = "DSN=database; UID=user; PWD=password"
    cn.Open()
    rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient
    rs.CursorType = ADODB.CursorTypeEnum.adOpenStatic
    rs.LockType = ADODB.LockTypeEnum.adLockBatchOptimistic
    Catch ex As Exception
    MsgBox("Failed to Connect!, Please check your Network Connections, or Contact MIS Dept. for assistance.", vbCritical, "Error while Connecting to Database.."
    End
    End Try
    End Sub
    End Class

    How can I make my adodc connect faster to my SQL Server? It's taking a minute (so long) before I can view thousand of record in my listview. Please anyone help me.
    I'm using this code:
    Public Class McheckpaymentNew
    Private cn As New ADODB.Connection
    Private rs As New ADODB.Recordset
    Private Sub McheckpaymentNew_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Try
    cn.ConnectionString = "DSN=database; UID=user; PWD=password"
    cn.Open()
    rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient
    rs.CursorType = ADODB.CursorTypeEnum.adOpenStatic
    rs.LockType = ADODB.LockTypeEnum.adLockBatchOptimistic
    Catch ex As Exception
    MsgBox("Failed to Connect!, Please check your Network Connections, or Contact MIS Dept. for assistance.", vbCritical, "Error while Connecting to Database.."
    End
    End Try
    End Sub
    End Class

  • How do I connect the debugger for remotely debugging PL/SQL?

    Hi everyone,
    Remotely debugging PL/SQL from JDeveloper and SQL Developer is something I have tried unsuccessfully to do.
    The steps I took were to right-click my connection, select Remote Debug... and specify "4000" for the Port and "n.n.n.n" for the Local address which seems to correctly start the listener. (I used ipconfig to double-check the address.) Then, I run the anonymous block you see below.
    begin
    dbms_debug_jdwp.connect_tcp( 'n.n.n.n', 4000 );
    end;
    But, I always get the following error:
    Error starting at line 18 in command:
    begin
    dbms_debug_jdwp.connect_tcp( 'n.n.n.n', 4000 );
    end;
    Error report:
    ORA-30683: failure establishing connection to debugger
    ORA-12535: TNS:operation timed out
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 2
    30683. 00000 -  "failure establishing connection to debugger"
    *Cause:    An error was indicated when trying to establish a connection
               to a debugger. Usually a TNS error will display along with
               this message to further explain the problem, although this
               TNS error will likely be hidden if you choose to trap the error.
    *Action:   Correct the indicated parameter value and try again.
    Additionally, my firewall in Windows 7 is disabled, and I work remotely from home via VPN.
    The instructions are thatI followed: Sue's Blog... again...: Remote Debugging with SQL Developer.
    Any help would be greatly appreciated. Thanks!
    James

    I found the answer.
    Object classes are missing.
    The right insert code is down but I have a new question.
    -How can I assign Resource acces to user in PL/SQL?
    Right insert code:
    declare
    vn_retval pls_integer;
    emp_session dbms_ldap.session;
    emp_dn varchar2(256);
    emp_array dbms_ldap.mod_array;
    emp_vals dbms_ldap.string_collection ;
    vv_ldap_host varchar2(256);
    vv_ldap_port varchar2(256);
    vv_ldap_user varchar2(256);
    vv_ldap_passwd varchar2(256);
    vv_ldap_base varchar2(256);
    begin
    vn_retval := -1;
    vv_ldap_host := 'XXXXXXX';
    vv_ldap_port := '389');
    vv_ldap_user := 'LDAP_USER';
    vv_ldap_passwd:= 'LDAP_PASSWD';
    vv_ldap_base := 'LDAP_BASE';
    dbms_ldap.use_exception := true;
    -- Initialize ldap library and get session handle.
    emp_session := dbms_ldap.init(vv_ldap_host, vv_ldap_port);
    -- Bind to the directory
    vn_retval := dbms_ldap.simple_bind_s(emp_session, vv_ldap_user, vv_ldap_passwd);
    -- Process New Entry in the database
    -- Create and setup attribute array for the New entry
    emp_array := dbms_ldap.create_mod_array(4);
    emp_vals(1) := 'NAME';
    dbms_ldap.populate_mod_array(emp_array, dbms_ldap.mod_add, 'cn', emp_vals);
    emp_vals(1) := 'NAME';
    dbms_ldap.populate_mod_array(emp_array, dbms_ldap.mod_add, 'sn', emp_vals);
    emp_vals(1) := 'top';
    emp_vals(2) := 'person';
    emp_vals(3) := 'organizationalPerson';
    emp_vals(4) := 'orcluserv2';
    emp_vals(5) := 'orcluser';
    emp_vals(6) := 'inetOrgPerson';
    dbms_ldap.populate_mod_array(emp_array, dbms_ldap.mod_add, 'objectclass', emp_vals);
    emp_vals.delete;
    emp_vals(1) := 'NAME' || '1';
    dbms_ldap.populate_mod_array(emp_array, dbms_ldap.mod_add, 'userpassword', emp_vals);
    -- DN for Entry to be Added under 'ldap_base'
    emp_dn := 'cn=' || 'NAME' || ', ' || vv_ldap_base ;
    -- Add new Entry to ldap directory
    vn_retval := dbms_ldap.add_s(emp_session, emp_dn, emp_array);
    -- Free attribute array (emp_array)
    dbms_ldap.free_mod_array(emp_array);
    -- Unbind from ldap directory
    vn_retval := dbms_ldap.unbind_s(emp_session);
    end;

  • How to read XML message present in Table using PL/SQL?

    Hi,
    How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
    Thanks!

    Late reply, but hopefully better late than never.
    You can possibly do it all via a single SQL statement, such as {message:id=4232077}
    XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html

  • How to find out the script for the table using SQL

    Hi,
    Could any one tell me that how to find out the script for the table using SQL.
    Thanks,
    kamal

    Kamal,
    You can find the SQL query in Advanced tab of Answers
    Thanks,
    Balaa...

Maybe you are looking for