Performs a bulk load on this RTree with the specified data. Is called by
the constructor and should be overwritten by subclasses if necessary.
9050
@Override
  protected void bulkLoad(List<E> spatialObjects) {
    if(!initialized) {
      initialize(spatialObjects.get(0));
    }

    StringBuilder msg = getLogger().isDebuggingFine() ? new StringBuilder() : null;

    // Tiny tree that fits into a single page
    if(spatialObjects.size() <= leafCapacity) {
      N root = createNewLeafNode();
      root.setPageID(getRootID());
      writeNode(root);
      createRoot(root, spatialObjects);
      setHeight(1);
      if(msg != null) {
        msg.append("\n  numNodes = 1");
      }
    }
    // root is directory node
    else {
      N root = createNewDirectoryNode();
      root.setPageID(getRootID());
      writeNode(root);

      // create leaf nodes
      List<E> nodes = createBulkLeafNodes(spatialObjects);

      int numNodes = nodes.size();
      if(msg != null) {
        msg.append("\n  numLeafNodes = ").append(numNodes);
      }
      setHeight(1);

      // create directory nodes
      while(nodes.size() > (dirCapacity - 1)) {
        nodes = createBulkDirectoryNodes(nodes);
        numNodes += nodes.size();
        setHeight(getHeight() + 1);
      }

      // create root
      createRoot(root, nodes);
      numNodes++;
      setHeight(getHeight() + 1);
      if(msg != null) {
        msg.append("\n  numNodes = ").append(numNodes);
      }
    }
    if(msg != null) {
      msg.append("\n  height = ").append(getHeight());
      msg.append("\n  root ").append(getRoot());
      getLogger().debugFine(msg.toString());
    }
  }
1087371
private void loadAllInstances(ZooClassProxy def, boolean subClasses, 
			MergingIterator<ZooPC> iter, boolean loadFromCache) {
		for (Node n: nodes) {
			iter.add(n.loadAllInstances(def, loadFromCache));
		}
		
		if (subClasses) {
			for (ZooClassProxy sub: def.getSubProxies()) {
				loadAllInstances(sub, true, iter, loadFromCache);
			}
		}
	}
397965
def _loadData(self, data):
        
        self._data = data
        self.id = utils.cast(int, data.attrib.get('id'))
        self.serverId = utils.cast(int, data.attrib.get('serverId'))
        self.machineIdentifier = data.attrib.get('machineIdentifier')
        self.name = data.attrib.get('name')
        self.lastSeenAt = utils.toDatetime(data.attrib.get('lastSeenAt'))
        self.numLibraries = utils.cast(int, data.attrib.get('numLibraries'))
        self.allLibraries = utils.cast(bool, data.attrib.get('allLibraries'))
        self.owned = utils.cast(bool, data.attrib.get('owned'))
        self.pending = utils.cast(bool, data.attrib.get('pending'))
51020
def expand_all(self):
        
        if implementsCollapseAPI(self._tree):
            self._tree.expand_all()
            self._walker.clear_cache()
            self.refresh()
511188
@Override
    public void sendData(TreeSet<Data> data) {
        if (data == null) {
            throw new IllegalArgumentException("Data must be not null");
        }
        if (data.isEmpty()) {
            return;
        }

        addData(data);

        if (distributed) {
            partitionManager.notifyData(new ArrayList<>(data));
        }
    }
552995
protected void loadChildren()
    {
        DynamicTreeNode     newNode;
//        Font                font;
//        int                 randomIndex;

        NodeData dataParent = (NodeData)this.getUserObject();
        FieldList fieldList = dataParent.makeRecord();
        FieldTable fieldTable = fieldList.getTable();

        m_fNameCount = 0;
        try   {
            fieldTable.close();
//          while (fieldTable.hasNext())
            while (fieldTable.next() != null)
            {
                String objID = fieldList.getField(0).toString();
                String strDescription = fieldList.getField(3).toString();
                NodeData data = new NodeData(dataParent.getBaseApplet(), dataParent.getRemoteSession(), strDescription, objID, dataParent.getSubRecordClassName());
                newNode = new DynamicTreeNode(data);
                /** Don't use add() here, add calls insert(newNode, getChildCount())
                  so if you want to use add, just be sure to set hasLoaded = true first. */
                this.insert(newNode, (int)m_fNameCount);
                m_fNameCount++;
            }
        } catch (Exception ex)  {
            ex.printStackTrace();
        }
        /** This node has now been loaded, mark it so. */
        m_bHasLoaded = true;
    }
629108
private synchronized void load() {
    Map<String, HadoopServer> map = new TreeMap<String, HadoopServer>();
    for (File file : saveDir.listFiles()) {
      try {
        HadoopServer server = new HadoopServer(file);
        map.put(server.getLocationName(), server);

      } catch (Exception exn) {
        System.err.println(exn);
      }
    }
    this.servers = map;
  }
1252977
public void run(final List<Tuple> data) {
        List<Tuple> dataCopy = new ArrayList<>(data);
        this.labels = data.parallelStream().map(x -> x.label).collect(Collectors.toSet());
        if (shuffleData) {
            Collections.shuffle(dataCopy);
        }

        int chunkSize = data.size() / nfold;

        int reminder = data.size() % chunkSize;

        for (int i = data.size() - 1; i > data.size() - 1 - reminder; i--) {
            LOG.info("Dropping the tail id: " + data.get(i).id);
        }

        for (int i = 0; i < nfold; i++) {
            System.err.println("Cross validation round " + (i + 1) + "/" + nfold);
            List<Tuple> testing = new ArrayList<>(data.subList(i, i + chunkSize));
            List<Tuple> training = new ArrayList<>(data.subList(0, i));
            training.addAll(data.subList(i + chunkSize, data.size()));

            eval(training, testing, i);
        }
    }
652828
def populate(self, node_generator):
        
        for data in node_generator:
            hashed = hash_byte_array(data)
            self.tree.add_leaf(hashed)
341200
def load(data):
    

    if hasattr(data, 'read') and callable(data.read):
      contents = data.read()
    elif isinstance(data, six.string_types):
      contents = data
    else:
      raise TypeError('Can only process data from a string or a readable object, given: %s' % data)

    return Properties._parse(contents.splitlines())
574297
public void setRootData(Map data) {
		for (Scope cur=this; true; cur=cur.parent) {
			if (cur.parent == null) {
				cur.data = data;
				return ;
			}
		}
	}
1318735
private void bulkloadTableFromResource(String table, Resource resource)
  {
    log.debug("bulk-loading data from '" + resource.getFilename()
      + "' into table '" + table + "'");
    String sql = "COPY \"" + table
      + "\" FROM STDIN WITH DELIMITER E'\t' NULL AS 'NULL'";

    try
    {
      // retrieve the currently open connection if running inside a transaction
      Connection originalCon = DataSourceUtils.getConnection(getDataSource());
      Connection con = originalCon;
      if (con instanceof DelegatingConnection)
      {
        DelegatingConnection<?> delCon = (DelegatingConnection<?>) con;
        con = delCon.getInnermostDelegate();
      }

      Preconditions.checkState(con instanceof PGConnection,
        "bulk-loading only works with a PostgreSQL JDBC connection");

      // Postgres JDBC4 8.4 driver now supports the copy API
      PGConnection pgCon = (PGConnection) con;
      pgCon.getCopyAPI().copyIn(sql, resource.getInputStream());

      DataSourceUtils.releaseConnection(originalCon, getDataSource());

    }
    catch (SQLException e)
    {
      throw new DatabaseAccessException(e);
    }
    catch (IOException e)
    {
      throw new FileAccessException(e);
    }
  }
614750
private void loadAndExpand(Object itemId, I_CmsOuTreeType type) {

        if (type.isOrgUnit()) {
            addChildrenForOUNode((CmsOrganizationalUnit)itemId);
        }
        if (type.isGroup()) {
            addChildrenForGroupsNode(type, (String)itemId);
        }
        if (type.isRole()) {
            addChildrenForRolesNode((String)itemId);
        }
        expandItem(itemId);
    }
874423
function loadTree (data) {
      // Just need to restore the `parent` parameter
      self.root = data;

      function restoreParent (root) {
        if (root.left) {
          root.left.parent = root;
          restoreParent(root.left);
        }

        if (root.right) {
          root.right.parent = root;
          restoreParent(root.right);
        }
      }

      restoreParent(self.root);
    }
380846
public boolean load()
    {
    	_load();
    	java.util.Iterator it = this.alChildren.iterator();
    	while (it.hasNext())
    	{
    		Object o = it.next();
    		if (o instanceof OjbMetaTreeNode) ((OjbMetaTreeNode)o).load();
    	}
    	return true;
    }
478048
@Override
  public final void insertAll(DBIDs ids) {
    if(ids.isEmpty() || (ids.size() == 1)) {
      return;
    }

    // Make an example leaf
    if(canBulkLoad()) {
      List<RdKNNEntry> leafs = new ArrayList<>(ids.size());
      for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
        leafs.add(createNewLeafEntry(DBIDUtil.deref(iter)));
      }
      bulkLoad(leafs);
    }
    else {
      for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
        insert(iter);
      }
    }

    doExtraIntegrityChecks();
  }
1201293
def load(self, data):
        
        objs = {}
        for mapper in self.entities:
            objs[mapper.name] = mapper.load(self.loader, data)

        for mapper in self.relations:
            objs[mapper.name] = mapper.load(self.loader, data, objs)