Results 1 to 8 of 8

Thread: Error "java.util.Arrays.mergeSort (Unknown Source)"

  1. #1
    Join Date
    Jan 2010
    Posts
    78

    Error "java.util.Arrays.mergeSort (Unknown Source)"

    I create a tree containing nodes. Then I sort my vector nodes using Collections.sort. Pb: When there are too many nodes (> 6600), I get this error.
    Code:
    Exception in thread "main" java. Lang. StackOverflowError
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. mergeSort (Unknown Source)
         Does java. util. Arrays. sort (Source Unknown)
         Does java. util. Collections. sort (Unknown Source)
         Has Scheduling. Best (projetOC. java: 625)
    Please help me as soon as possible.

  2. #2
    Join Date
    Mar 2008
    Posts
    227

    Re: Error "java.util.Arrays.mergeSort (Unknown Source)"

    Perhaps by implementing your own sort of non-recursive suddenly Collections.swap thou canst go out (maybe it already exists in Java). I think that you should know about the sorting of algorithm to fix this problem. Once you have the knowledge of it, you can do the needful changes and then can fix your problem on your own. hope you understand what I am saying..!!

  3. #3
    Join Date
    Mar 2008
    Posts
    192

    Re: Error "java.util.Arrays.mergeSort (Unknown Source)"

    If you use Java from Sun, the argument to define the size of the stack is XSS <size>.
    Code:
     java-classpath. / bin-Xss128m org. package. MyClass
    According to me, you must get idea form this post.

  4. #4
    Join Date
    Mar 2008
    Posts
    258

    Re: Error "java.util.Arrays.mergeSort (Unknown Source)"

    I think that you should know about the sorting of algorithm to fix this problem. Once you have the knowledge of it, you can do the needful changes and then can fix your problem on your own.
    A sorting algorithm is in computer science or mathematics, an algorithm that allows to organize a collection of objects in a specified order. The objects to be sorted are part of a set equipped with an order relation (generally a total order). The most used orders are numerical order and the lexicographic order (dictionary).

  5. #5
    Join Date
    Apr 2008
    Posts
    193

    Re: Error "java.util.Arrays.mergeSort (Unknown Source)"

    The classification of sorting algorithms is very important because it allows to choose the algorithm best suited to the problem addressed, taking into account the constraints imposed by it. We distinguish, first, the sorting algorithm of general application, by making comparisons between pairs of elements, and more specialized algorithms making restrictive assumptions about the structure of entered data (eg counting sort which applies only if the data are taken from a small group known in advance). If nothing specified, is usually meant by "sorting algorithm" a general algorithm for sorting by comparison. The main features that distinguish the sorting algorithms are the computational complexity, resource requirements (particularly in terms of memory space used) and the stable character.

  6. #6
    Join Date
    Oct 2008
    Posts
    167

    Re: Error "java.util.Arrays.mergeSort (Unknown Source)"

    The following are some Algorithmic Complexity :
    • The computational complexity time in the worst cases can set an upper bound on the number of operations that will be needed to sort a set of n elements.
    • The average time computational complexity: the number of elementary operations performed on average to sort a collection of elements. It compares the sorting algorithms and gives a good idea of the execution time will be needed in the algorithm, we arrive at the estimate with an accuracy of some importance. However, if the sets have to sort a particular shape and are not representative of the n! Possible combinations, then the performance will be much lower or much higher complexity "average".
    • The computational complexity space (on average or in the worst case) is, in turn, use memory that will require the algorithm. This may depend, as the execution time, the number of elements to sort.

  7. #7
    Join Date
    Aug 2006
    Posts
    227

    Re: Error "java.util.Arrays.mergeSort (Unknown Source)"

    The sorting problem is, given a sequence u = (u 1, u 2, ..., u n) of elements of an ordered set (eg ), To determine a permutation σ 1, ..., n such that: y = (u σ (1), u σ (2), ..., u σ (n)) is sorted. Assume for simplicity that the elements are distinct, which makes the single permutation σ. The result is more true in the general case. A sorting algorithm is modeled by successive comparisons as a binary tree, each node of the tree corresponding to a comparison between two elements of the set. It compares two elements u i and u j, and depending on the result, we go to one of the following nodes, where they proceeded to another comparison. Each leaf (end node) of the tree corresponds to a totally sorted.

  8. #8
    Join Date
    Jul 2006
    Posts
    442

    Re: Error "java.util.Arrays.mergeSort (Unknown Source)"

    Given a binary tree A, we note F (A) the average depth of leaves of A. If all permutations of elements in the input are equally likely, then the average number of comparisons for sorting comparisons with Tree A is equal to F (A). For a fixed number of nodes, minimizing F trees are complete binary trees (that is those where all leaves are at the last or penultimate level). Indeed, in a tree a not complete, there is a leaf of depth h and a sheet of depth at most h -2. Hanging up the first sheet in the second, we obtain a tree A 'such that F (A') <F (A). The function F has the same value on all complete binary trees with n! leaves, Or At one of them, note h its height. All the leaves are deep at least h -1, so the average depth of leaves is at least(Again using the property 2 h ≥ n!).

Similar Threads

  1. Replies: 5
    Last Post: 13-06-2011, 09:15 PM
  2. Replies: 3
    Last Post: 09-12-2010, 07:09 AM
  3. Replies: 5
    Last Post: 09-10-2010, 02:36 PM
  4. Mysql error message "Unknown column in on clause"
    By Carnie in forum Software Development
    Replies: 3
    Last Post: 21-11-2009, 11:03 AM
  5. DCOM got error "Logon failure: unknown user name or bad password."
    By Chitesh in forum Small Business Server
    Replies: 2
    Last Post: 03-10-2006, 06:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,252,190.62553 seconds with 17 queries