🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #923

Alguien sabe para que sirve Merge

#923
From: gartuz
Date: Wed, 18 Oct 2006 03:29
30 lines
1787 bytes
   Quise averiguar que hace y no se:

 public vector merge(vector h){
      vector vn = new vector(tamfisico + h.tamfisico);
      vn.tamlog = (tamlog + h.tamlog);
      int ih = 0;
      int ivn = 0;
      int i = 0;

      while((ih < h.tamlog) && (i < tamlog))
      {if (vec[i] <= h.vec[ih])
      {vn.vec[ivn] = vec[i];
        ++i;}
        else
        {vn.vec[ivn] = h.vec[ih];
        ++ih;}
        ++ ivn;}

      if (i < tamlog)
      {for (int j = i; j < tamlog;++j)
      {vn.vec[ivn] = vec[j];
        ++ivn;}}
      else
      {for (int j = ih; j < h.tamlog;++j)
      {vn.vec[ivn] = h.vec[j];
        ++ivn;}}
      
      return vn;
        
      }
Technical Details
Message-ID: <1161142193.862816.229460@i42g2000cwa.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i42g2000cwa.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1116f3,d87dc6b13930aaa1,start
X-Google-Attributes: gid1116f3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i42g2000cwa.googlegroups.com!not-for-mail
From: "gartuz" <gartuz@gmail.com>
Newsgroups: es.comp.lenguajes.java
Subject: Alguien sabe para que sirve Merge
Date: 17 Oct 2006 20:29:53 -0700
Organization: http://groups.google.com
Lines: 31
Message-ID: <1161142193.862816.229460@i42g2000cwa.googlegroups.com>
NNTP-Posting-Host: 163.178.17.119
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1161142198 8632 127.0.0.1 (18 Oct 2006 03:29:58 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 18 Oct 2006 03:29:58 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: i42g2000cwa.googlegroups.com; posting-host=163.178.17.119;
   posting-account=qBaNMg0AAACDzgHUnKEJyn8KepeZg3Yo