Method initialise the given grid points with a value.
760785
public void initializeGrid(double value) {
        for (int i = 0; i < grid.length; i++) {
            for (int j = 0; j < grid[0].length; j++) {
                for (int k = 0; k < grid[0][0].length; k++) {
                    grid[k][j][i] = value;
                }
            }
        }
    }
850979
@Override
    protected void init(Object target, PropertyInfo propInfo, PropertyGrid propGrid) {
        super.init(target, propInfo, propGrid);

        Iterable<?> iter = (Iterable<?>) propInfo.getPropertyType().getSerializer();

        for (Object value : iter) {
            appendItem(value.toString(), value);
        }

    }
643591
public void setFromPoints(Point2D[] points) {
		if (points == null || points.length == 0) {
			setEmpty();
			return;
		}

		Point2D pt = points[0];
		setCoords(pt.x, pt.y);
		for (int i = 1; i < points.length; i++) {
			Point2D pt2d = points[i];
			mergeNE(pt2d.x, pt2d.y);
		}
	}
890771
private void initialize() {
        this.setLayout(new GridBagLayout());
        if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
            this.setSize(375, 204);
        }
        this.setName(Constant.messages.getString("pscan.options.policy.title"));
    	JPanel passiveScannersFilterPanel = new TableFilterPanel<JXTable>(getTableTest());
        
        // 'Apply to' controls
        JPanel applyToPanel = new JPanel();
        applyToPanel.setLayout(new GridBagLayout());
        applyToPanel.add(new JLabel(Constant.messages.getString("pscan.options.policy.apply.label")), 
        		LayoutHelper.getGBC(0, 0, 1, 0.0, new Insets(2, 2, 2, 2)));
        applyToPanel.add(getApplyToThreshold(), LayoutHelper.getGBC(1, 0, 1, 0.0));
        applyToPanel.add(new JLabel(Constant.messages.getString("pscan.options.policy.thresholdTo.label")), 
        		LayoutHelper.getGBC(2, 0, 1, 0.0, new Insets(2, 2, 2, 2)));
        applyToPanel.add(getApplyToThresholdTarget(), LayoutHelper.getGBC(3, 0, 1, 0.0));
        applyToPanel.add(new JLabel(Constant.messages.getString("pscan.options.policy.rules.label")), LayoutHelper.getGBC(4, 0, 1, 0.0, new Insets(2, 2, 2, 2)));
        JButton applyThresholdButton = new JButton(Constant.messages.getString("pscan.options.policy.go.button"));
        applyThresholdButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				applyThreshold (strToThreshold((String)getApplyToThreshold().getSelectedItem()),
						(String)getApplyToThresholdTarget().getSelectedItem());
				getPassiveScanTableModel().fireTableDataChanged();
				
			}});
        applyToPanel.add(applyThresholdButton, LayoutHelper.getGBC(5, 0, 1, 0.0));
        applyToPanel.add(new JLabel(""), LayoutHelper.getGBC(6, 0, 1, 1.0));	// Spacer
        
        
        this.add(applyToPanel,
                LayoutHelper.getGBC(0, 0, 3, 0.0D, 0.0D, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0)));

        this.add(passiveScannersFilterPanel,LayoutHelper.getGBC(0, 1, 1, 1.0D, 0.0D,
                        GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, new Insets(0, 0, 0, 0)));

        this.add(getJScrollPane(), 
        		LayoutHelper.getGBC(0, 2, 1, 1.0, 1.0,
        				GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, new Insets(0, 0, 0, 0)));
    }
703126
private void initGrid() {
        // Setting up images grid
        final int cols = getResources().getInteger(R.integer.images_grid_columns);

        views.grid.setLayoutManager(new GridLayoutManager(this, cols));

        gridAdapter = new PhotoListAdapter(this);
        gridAdapter.setLoadingOffset(PAGE_SIZE / 2);
        gridAdapter.setCallbacks(new EndlessRecyclerAdapter.LoaderCallbacks() {
            @Override
            public boolean canLoadNextItems() {
                return gridAdapter.canLoadNext();
            }

            @Override
            public void loadNextItems() {
                // We should either load all items that were loaded before state save / restore,
                // or next page if we already loaded all previously shown items
                int count = Math.max(savedPhotoCount, gridAdapter.getCount() + PAGE_SIZE);
                Events.create(FlickrApi.LOAD_IMAGES_EVENT).param(count).post();
            }
        });
        views.grid.setAdapter(gridAdapter);
    }
184500
private void initArrays() {
        if (data == null || picsize != data.length) {
            data = new int[picsize];
            magnitude = new int[picsize];

            xConv = new float[picsize];
            yConv = new float[picsize];
            xGradient = new float[picsize];
            yGradient = new float[picsize];
        }
    }
831270
def _initialize(self, *args, **kwargs):
        """"""
        self.items = None
        self.keys = None
        self.values = None

        if args:
            if len(args) != 2:
                raise TypeError("expected exactly two positional arguments, "
                                "got %s" % len(args))
            if kwargs:
                raise TypeError(
                    "expected positional or keyword arguments, not both")

            # got positional arguments only
            self.keys, self.values = map(self._validate_argument, args)
        elif kwargs:
            has_kv = 'keys' in kwargs and 'values' in kwargs
            has_of = 'of' in kwargs
            if not (has_kv or has_of):
                raise TypeError("expected keys/values or items matchers, "
                                "but got: %s" % list(kwargs.keys()))
            if has_kv and has_of:
                raise TypeError(
                    "expected keys & values, or items matchers, not both")

            if has_kv:
                # got keys= and values= matchers
                self.keys = self._validate_argument(kwargs['keys'])
                self.values = self._validate_argument(kwargs['values'])
            else:
                # got of= matcher, which can be a tuple of matchers,
                # or a single matcher for dictionary items
                of = kwargs['of']
                if isinstance(of, tuple):
                    try:
                        # got of= as tuple of matchers
                        self.keys, self.values = \
                            map(self._validate_argument, of)
                    except ValueError:
                        raise TypeError(
                            "of= tuple has to be a pair of matchers/types" % (
                                self.__class__.__name__,))
                else:
                    # got of= as a single matcher
                    self.items = self._validate_argument(of)
156145
public void initialise()
  {
    super.initialise();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "initialise");
      
    _deletedQueuePoints = new HashMap();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initialise");
  }
920415
def initialize_axes(self, boundary=0.05):
        """"""
        bs = [(self.vals[:, i].max()-self.vals[:, i].min())*boundary for i in range(3)]
        self.x_lim = np.array([self.vals[:, 0].min()-bs[0], self.vals[:, 0].max()+bs[0]])
        self.y_lim = np.array([self.vals[:, 1].min()-bs[1], self.vals[:, 1].max()+bs[1]])
        self.z_lim = np.array([self.vals[:, 2].min()-bs[2], self.vals[:, 2].max()+bs[2]])
1027123
private void init() {
        _minValue                           = 0;
        _maxValue                           = 100;
        value                               = new DoublePropertyBase(_minValue) {
            @Override protected void invalidated() {
                final double VALUE = get();
                withinSpeedLimit = !(Instant.now().minusMillis(getAnimationDuration()).isBefore(lastCall));
                lastCall = Instant.now();
                if (isAnimated() && withinSpeedLimit) {
                    long animationDuration = isReturnToZero() ? (long) (0.2 * getAnimationDuration()) : getAnimationDuration();
                    timeline.stop();

                    final KeyValue KEY_VALUE;
                    if (NeedleBehavior.STANDARD == getNeedleBehavior()) {
                        KEY_VALUE = new KeyValue(currentValue, VALUE, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                    } else { // Optimized only useful in a gauge where the angle range is 360 deg and the shorter way has to be calculated.
                        double ov         = getOldValue();
                        double min        = getMinValue();
                        double max        = getMaxValue();
                        double halfRange  = getRange() * 0.5;
                        double cv         = getCurrentValue();
                        double delta      = VALUE - getCurrentValue();

                        if (delta < -halfRange) {
                            double kv1 = max - cv;
                            double kv2 = VALUE;
                        } else if (delta > halfRange) {

                        }

                        double tmpValue;

                        if (Math.abs(VALUE - ov) > getRange() * 0.5) {
                            if (ov < VALUE) {
                                tmpValue = min - max + VALUE;
                            } else {
                                tmpValue = ov + max - ov + min + VALUE - getRange();
                            }
                            KEY_VALUE = new KeyValue(currentValue, tmpValue, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                        } else {
                            if (cv < min) currentValue.set(max + cv);
                            KEY_VALUE = new KeyValue(currentValue, VALUE, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                        }
                    }
                    final KeyFrame KEY_FRAME = new KeyFrame(Duration.millis(animationDuration), KEY_VALUE);
                    timeline.getKeyFrames().setAll(KEY_FRAME);
                    timeline.play();
                } else {
                    currentValue.set(VALUE);
                    fireUpdateEvent(FINISHED_EVENT);
                }
                if (isAveragingEnabled()) { movingAverage.addData(new Data(VALUE)); }
            }
            @Override public void set(final double VALUE) {
                super.set(VALUE);
                fireUpdateEvent(VALUE_EVENT);
            }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "value"; }
        };
        oldValue                            = new SimpleDoubleProperty(Gauge.this, "oldValue", value.get());
        currentValue                        = new DoublePropertyBase(value.get()) {
            @Override protected void invalidated() {
                final double VALUE = get();
                if (isCheckThreshold()) {
                    double thrshld = getThreshold();
                    if (formerValue.get() < thrshld && VALUE > thrshld) {
                        fireEvent(EXCEEDED_EVENT);
                    } else if (formerValue.get() > thrshld && VALUE < thrshld) {
                        fireEvent(UNDERRUN_EVENT);
                    }
                }
                if (VALUE < getMinMeasuredValue()) {
                    setMinMeasuredValue(VALUE);
                } else if (VALUE > getMaxMeasuredValue()) {
                    setMaxMeasuredValue(VALUE);
                }
                formerValue.set(VALUE);
            }
            @Override public void set(final double VALUE) { super.set(VALUE); }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "currentValue";}
        };
        formerValue                         = new SimpleDoubleProperty(Gauge.this, "formerValue", value.get());
        _range                              = _maxValue - _minValue;
        _threshold                          = _maxValue;
        _title                              = "";
        _subTitle                           = "";
        _unit                               = "";
        _averagingEnabled                   = false;
        _averagingPeriod                    = 10;
        movingAverage                       = new MovingAverage(_averagingPeriod);
        sections                            = FXCollections.observableArrayList();
        areas                               = FXCollections.observableArrayList();
        tickMarkSections                    = FXCollections.observableArrayList();
        tickLabelSections                   = FXCollections.observableArrayList();
        markers                             = FXCollections.observableArrayList();

        _startFromZero                      = false;
        _returnToZero                       = false;
        _zeroColor                          = DARK_COLOR;
        _minMeasuredValue                   = _maxValue;
        _maxMeasuredValue                   = _minValue;
        _minMeasuredValueVisible            = false;
        _maxMeasuredValueVisible            = false;
        _oldValueVisible                    = false;
        _valueVisible                       = true;
        _backgroundPaint                    = Color.TRANSPARENT;
        _borderPaint                        = Color.TRANSPARENT;
        _borderWidth                        = 1;
        _foregroundPaint                    = Color.TRANSPARENT;
        _knobColor                          = Color.rgb(204, 204, 204);
        _knobType                           = KnobType.STANDARD;
        _knobPosition                       = Pos.CENTER;
        _knobVisible                        = true;
        _animated                           = false;
        animationDuration                   = 800;
        _startAngle                         = 320;
        _angleRange                         = 280;
        _angleStep                          = _angleRange / _range;
        _autoScale                          = true;
        _shadowsEnabled                     = false;
        _barEffectEnabled                   = false;
        _scaleDirection                     = ScaleDirection.CLOCKWISE;
        _tickLabelLocation                  = TickLabelLocation.INSIDE;
        _tickLabelOrientation               = TickLabelOrientation.HORIZONTAL;
        _tickLabelColor                     = DARK_COLOR;
        _tickMarkColor                      = DARK_COLOR;
        _majorTickMarkColor                 = DARK_COLOR;
        _majorTickMarkLengthFactor          = 0.42;
        _majorTickMarkWidthFactor           = 0.275;
        _mediumTickMarkColor                = DARK_COLOR;
        _mediumTickMarkLengthFactor         = 0.41;
        _mediumTickMarkWidthFactor          = 0.175;
        _minorTickMarkColor                 = DARK_COLOR;
        _minorTickMarkLengthFactor          = 0.40;
        _minorTickMarkWidthFactor           = 0.1125;
        _majorTickMarkType                  = TickMarkType.LINE;
        _mediumTickMarkType                 = TickMarkType.LINE;
        _minorTickMarkType                  = TickMarkType.LINE;
        _locale                             = Locale.US;
        _decimals                           = 1;
        _tickLabelDecimals                  = 0;
        _needleType                         = NeedleType.STANDARD;
        _needleShape                        = NeedleShape.ANGLED;
        _needleSize                         = NeedleSize.STANDARD;
        _needleBehavior                     = NeedleBehavior.STANDARD;
        _needleColor                        = Color.rgb(200, 0, 0);
        _needleBorderColor                  = Color.TRANSPARENT;
        _barColor                           = BRIGHT_COLOR;
        _barBorderColor                     = Color.TRANSPARENT;
        _barBackgroundColor                 = DARK_COLOR;
        _lcdDesign                          = LcdDesign.STANDARD;
        _lcdFont                            = LcdFont.DIGITAL_BOLD;
        _ledColor                           = Color.RED;
        _ledType                            = LedType.STANDARD;
        _titleColor                         = DARK_COLOR;
        _subTitleColor                      = DARK_COLOR;
        _unitColor                          = DARK_COLOR;
        _valueColor                         = DARK_COLOR;
        _thresholdColor                     = Color.CRIMSON;
        _averageColor                       = Color.MAGENTA;
        _checkSectionsForValue              = false;
        _checkAreasForValue                 = false;
        _checkThreshold                     = false;
        _innerShadowEnabled                 = false;
        _thresholdVisible                   = false;
        _averageVisible                     = false;
        _sectionsVisible                    = false;
        _sectionsAlwaysVisible              = false;
        _sectionTextVisible                 = false;
        _sectionIconsVisible                = false;
        _highlightSections                  = false;
        _areasVisible                       = false;
        _areaTextVisible                    = false;
        _areaIconsVisible                   = false;
        _highlightAreas                     = false;
        _tickMarkSectionsVisible            = false;
        _tickLabelSectionsVisible           = false;
        _markersVisible                     = false;
        _tickLabelsVisible                  = true;
        _onlyFirstAndLastTickLabelVisible   = false;
        _majorTickMarksVisible              = true;
        _mediumTickMarksVisible             = true;
        _minorTickMarksVisible              = true;
        _tickMarkRingVisible                = false;
        _majorTickSpace                     = 10;
        _minorTickSpace                     = 1;
        _lcdVisible                         = false;
        _lcdCrystalEnabled                  = false;
        _ledVisible                         = false;
        _ledOn                              = false;
        _ledBlinking                        = false;
        _orientation                        = Orientation.HORIZONTAL;
        _gradientBarEnabled                 = false;
        _customTickLabelsEnabled            = false;
        customTickLabels                    = FXCollections.observableArrayList();
        _customTickLabelFontSize            = 18;
        _interactive                        = false;
        _buttonTooltipText                  = "";
        _keepAspect                         = true;
        _customFontEnabled                  = false;
        _customFont                         = Fonts.robotoRegular(12);
        _alert                              = false;
        _alertMessage                       = "";
        _smoothing                          = false;
        formatString                        = "%.2f";

        originalMinValue                    = -Double.MAX_VALUE;
        originalMaxValue                    = Double.MAX_VALUE;
        originalThreshold                   = Double.MAX_VALUE;
        lastCall                            = Instant.now();
        timeline                            = new Timeline();
        timeline.setOnFinished(e -> {
            if (isReturnToZero() && Double.compare(currentValue.get(), 0.0) != 0.0) {
                final KeyValue KEY_VALUE2 = new KeyValue(value, 0, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                final KeyFrame KEY_FRAME2 = new KeyFrame(Duration.millis((long) (0.8 * getAnimationDuration())), KEY_VALUE2);
                timeline.getKeyFrames().setAll(KEY_FRAME2);
                timeline.play();
            }
            fireUpdateEvent(FINISHED_EVENT);
        });
    }
679052
private void initialize()
   {
      m_frame = new JFrame();
      m_frame.setBounds(100, 100, 900, 451);
      m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      m_frame.getContentPane().setLayout(new GridLayout(1, 0, 0, 0));

      final FileChooserModel fileChooserModel = new FileChooserModel();
      final FileChooserController fileChooserController = new FileChooserController(fileChooserModel);
      @SuppressWarnings("unused")
      FileChooserView fileChooserView = new FileChooserView(m_frame, fileChooserModel);
      fileChooserModel.setExtensions("cdpx", "cdpz", "fts", "gan", "gnt", "mdb", "mpp", "mpx", "pep", "planner", "pmxml", "pod", "pp", "ppx", "prx", "sp", "stx", "xer", "xml", "zip");

      final FileSaverModel fileSaverModel = new FileSaverModel();
      final FileSaverController fileSaverController = new FileSaverController(fileSaverModel);
      @SuppressWarnings("unused")
      FileSaverView fileSaverView = new FileSaverView(m_frame, fileSaverModel);
      fileSaverModel.setExtensions("sdef", "sdef", "mpx", "mpx", "planner", "xml", "pmxml", "xml", "json", "json", "mspdi", "xml");

      JMenuBar menuBar = new JMenuBar();
      m_frame.setJMenuBar(menuBar);

      JMenu mnFile = new JMenu("File");
      menuBar.add(mnFile);

      JMenuItem mntmOpen = new JMenuItem("Open File...");
      mnFile.add(mntmOpen);

      final JMenuItem mntmSave = new JMenuItem("Save As...");
      mntmSave.setEnabled(false);
      mnFile.add(mntmSave);

      //
      // Open file
      //
      mntmOpen.addActionListener(new ActionListener()
      {
         @Override public void actionPerformed(ActionEvent e)
         {
            fileChooserController.openFileChooser();
         }
      });

      //
      // Save file
      //
      mntmSave.addActionListener(new ActionListener()
      {
         @Override public void actionPerformed(ActionEvent e)
         {
            fileSaverController.openFileSaver();
         }
      });

      final JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP);
      m_frame.getContentPane().add(tabbedPane);

      PropertyAdapter<FileChooserModel> openAdapter = new PropertyAdapter<FileChooserModel>(fileChooserModel, "file", true);
      openAdapter.addValueChangeListener(new PropertyChangeListener()
      {
         @Override public void propertyChange(PropertyChangeEvent evt)
         {
            File file = fileChooserModel.getFile();
            tabbedPane.add(file.getName(), new ProjectFilePanel(file));
            mntmSave.setEnabled(true);
         }
      });

      PropertyAdapter<FileSaverModel> saveAdapter = new PropertyAdapter<FileSaverModel>(fileSaverModel, "file", true);
      saveAdapter.addValueChangeListener(new PropertyChangeListener()
      {
         @Override public void propertyChange(PropertyChangeEvent evt)
         {
            ProjectFilePanel panel = (ProjectFilePanel) tabbedPane.getSelectedComponent();
            panel.saveFile(fileSaverModel.getFile(), fileSaverModel.getType());
         }
      });

   }
496269
private void initialize() {
        width = getContext().getResources().getDimensionPixelSize(R.dimen.default_width);
        maximize = false;
        adapter = new DividableGridAdapter(getContext(), Style.LIST, width);
        super.setOnShowListener(createOnShowListener());
    }
1285601
def map_init(interface, params):
    """"""
    import numpy as np
    import random
    np.random.seed(params['seed'])
    random.seed(params['seed'])
    return params
1235985
def _init_map(self):
        """"""
        DecimalValuesFormRecord._init_map(self)
        IntegerValuesFormRecord._init_map(self)
        TextAnswerFormRecord._init_map(self)
        FilesAnswerFormRecord._init_map(self)
        FeedbackAnswerFormRecord._init_map(self)
        super(CalculationInteractionFeedbackAndFilesAnswerFormRecord, self)._init_map()
        self.my_osid_object_form._my_map['toleranceMode'] = \
            self._tolerance_mode_metadata['default_string_values'][0]
207233
def _initialize_distance_grid(self):
        """"""
        p = [self._grid_distance(i) for i in range(self.num_neurons)]
        return np.array(p)
226836
def initialize(self, length=None):
        """"""
        if length is None:
            length = len(self.bounds)
        max_i = min((len(self.bounds) - 1, length - 1))
        self._lb = array([self.bounds[min((i, max_i))][0]
                          if self.bounds[min((i, max_i))][0] is not None
                          else -np.Inf
                          for i in xrange(length)], copy=False)
        self._ub = array([self.bounds[min((i, max_i))][1]
                          if self.bounds[min((i, max_i))][1] is not None
                          else np.Inf
                          for i in xrange(length)], copy=False)
        lb = self._lb
        ub = self._ub
        # define added values for lower and upper bound
        self._al = array([min([(ub[i] - lb[i]) / 2, (1 + np.abs(lb[i])) / 20])
                             if isfinite(lb[i]) else 1 for i in rglen(lb)], copy=False)
        self._au = array([min([(ub[i] - lb[i]) / 2, (1 + np.abs(ub[i])) / 20])
                             if isfinite(ub[i]) else 1 for i in rglen(ub)], copy=False)
137916
@Override
	public void initialize(Collection<Instance> trainingPoints)
	{
		Iterator<Instance> trgPtsIterator = trainingPoints.iterator();
		
		if(trgPtsIterator.hasNext())
			this.trainOnInstance(trgPtsIterator.next());
	}