×

Discussion Board

Results 1 to 5 of 5

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    80

    Symetric Matrix calculation

    Hi
    Need some help about symetric matrix calculation. Need some generic formula to calculate in particular order.

    -1 51 54 25 77
    51 -1 44 70 96
    54 44 -1 87 94
    25 70 87 -1 88
    77 96 94 88 -1

    I want to add several items to make an array of sum in this order.
    Example,
    sum = 01 +12 + 23 + 34+ 45
    (start with element row 0 column 1, last column number is index for next element)

    some more example:
    sum = 01 +13 + 34 + 45+ 52
    sum = 01 +14 + 45 + 52+ 23
    sum = 01 +15 + 52 + 23+ 34

    sum = 02 +23 + 34 + 45+ 51
    sum = 02 +24 + 45 + 51+ 13 and so on.

    Each sum should take maximum number (maximum row or column, an item column is row for next item and each column is taken only one times)
    as number of items in the matrix. If row and column is same we don't add it or if the cell value is -1.

    How can I generelize these?

    Br
    Aktar

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: Symetric Matrix calculation

    Most programming languages support arrays, indexing of arrays, and loops. C++ is not an exception.

  3. #3
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    80

    Re: Symetric Matrix calculation

    Quote Originally Posted by wizard_hu_ View Post
    Most programming languages support arrays, indexing of arrays, and loops. C++ is not an exception.
    I know, would be nice if you can give me general formula for this, I would like to include it in my app. I spent sometimes and looks difficult for me,

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: Symetric Matrix calculation

    This description is not entirely clear to me. Is it some kind of spanning-tree generator for weighted graphs? (http://en.wikipedia.org/wiki/Spanning_tree, http://en.wikipedia.org/wiki/Weighted_graph)

  5. #5
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    80

    Re: Symetric Matrix calculation

    Quote Originally Posted by wizard_hu_ View Post
    This description is not entirely clear to me. Is it some kind of spanning-tree generator for weighted graphs? (http://en.wikipedia.org/wiki/Spanning_tree, http://en.wikipedia.org/wiki/Weighted_graph)
    Hi,
    Thanks for your information.
    Following link gave me some light for solving the problem but
    http://www.cplusplus.com/reference/a...t_permutation/
    I am going to use it in my Qt app and I get the following error

    error: 'sort' was not declared in this scope
    error: 'next_permutation' was not declared in this scope
    If I test it in visual studio in windows, work great but in QtSDK it gives this error (I have included #include <algorithm> )
    So what is missing for Qt project?

Similar Threads

  1. DST Calculation in FlashLite 4
    By sangramp@cybage.com in forum [Archived] Flash Lite on Nokia Devices
    Replies: 1
    Last Post: 2011-09-16, 11:19
  2. checksum calculation
    By bejoy_ak in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2009-11-14, 02:59
  3. Calculation of MAC in the WSP header
    By 2sents in forum OMA DM/DS/CP
    Replies: 11
    Last Post: 2009-05-26, 10:16
  4. calculation
    By sumit.rathi in forum Symbian
    Replies: 2
    Last Post: 2008-12-15, 12:27
  5. Please help about calculation of float number
    By quatban in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2006-12-05, 14:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×