public GridInterpolationModalForm(List <VectorLayer> vectorLayers, AbstractLayer selectedLayer) { InitializeComponent(); TypeGeometryComboBox.SelectedIndexChanged -= UpdateGeometry; VectorLayersListComboBox.SelectedIndexChanged -= UpdateGeometry; numericUpDownGridStep.ValueChanged -= UpdateGeometry; numericUpDownX.ValueChanged -= UpdateXStepGeometry; numericUpDownY.ValueChanged -= UpdateYStepGeometry; VectorLayersListComboBox.Items.Clear(); VectorLayersListComboBox.DataSource = vectorLayers; VectorLayersListComboBox.DisplayMember = "Name"; VectorLayersListComboBox.ValueMember = "Name"; SelectedLayer = selectedLayer; //selectedGeometry = gridGeometry; GetDefaultGeometry(); UpdateGeometry(new object(), new EventArgs()); TypeGeometryComboBox.SelectedIndexChanged += UpdateGeometry; VectorLayersListComboBox.SelectedIndexChanged += UpdateGeometry; numericUpDownGridStep.ValueChanged += UpdateGeometry; numericUpDownX.ValueChanged += UpdateXStepGeometry; numericUpDownY.ValueChanged += UpdateYStepGeometry; }
/// <summary> /// 节点Check事件,用于查询图层内容 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void advTreeMain_AfterCheck(object sender, AdvTreeCellEventArgs e) { Node checkNode = e.Cell.Parent; AbstractLayer lyr = this.GetLayerByName(checkNode.Text); //影像图层加载 if (lyr == null) { string path = Path.Combine(Path.GetDirectoryName(_projectPath), checkNode.Text + ".xml"); if (File.Exists(path) == false) { return; } DomLayerInfo lyrInfo = XmlHelper.Deserialize <DomLayerInfo>(path); if (lyrInfo == null) { return; } lyr = LayerLoader.CreateDomLyr(lyrInfo, _globeView); } if (lyr != null) { lyr.Visible = e.Cell.Checked; } //飞行 if (e.Cell.Checked) { this.LocLyrByName(checkNode.Text); } }
public BackPropagationLearning(ActivationNetwork network) { this.network = network; // create error and deltas arrays _neuronErrors = new double[network.LayersCount][]; _weightsUpdates = new double[network.LayersCount][][]; _thresholdsUpdates = new double[network.LayersCount][]; // initialize errors and deltas arrays for each layer for (int i = 0, n = network.LayersCount; i < n; i++) { AbstractLayer layer = network[i]; _neuronErrors[i] = new double[layer.NeuronsCount]; _weightsUpdates[i] = new double[layer.NeuronsCount][]; _thresholdsUpdates[i] = new double[layer.NeuronsCount]; // for each neuron for (int j = 0; j < layer.NeuronsCount; j++) { _weightsUpdates[i][j] = new double[layer.InputsCount]; } } }
/// <summary> /// Initializes a new instance of the <see cref="ArtifactEditorDialog"/> class. /// </summary> /// <param name="layer">The layer.</param> public ArtifactEditorDialog(AbstractLayer layer) { _layer = layer; InitializeComponent(); pnlActions.Location = pnlEdition.Location; PopulateList(); }
/// <summary> /// Initializes a new instance of the <see cref="ManageArtifactsCommand"/> class. /// </summary> /// <param name="model">The model.</param> public ManageArtifactsCommand(object model) { _layer = null; if (model is NodeShape) { _layer = ((NodeShape)model).ModelElement as AbstractLayer; } }
private void toolStripButton6_Click(object sender, EventArgs e) { double searchRadius = 1; int power = 1; if (map.LayerControl.SelectedLayer != null && map.LayerControl.SelectedLayer is VectorLayer && map.LayerControl.SelectedLayer.Visible) { VectorLayer vectorLayer = (VectorLayer)map.LayerControl.SelectedLayer; GridGeometry gridGeometry = null; GridInterpolationModalForm interpolationForm = new GridInterpolationModalForm(); interpolationForm.InitializeForm(map.LayerControl.VectorLayers, ref vectorLayer, ref gridGeometry, ref searchRadius, ref power); if (interpolationForm.DialogResult == DialogResult.OK) { GridLayer gridLayer = new GridLayer(gridGeometry, map); foreach (var layer in map.Layers) { if (layer.Name == gridLayer.Name) { gridLayer.Name = Interaction.InputBox("Grid для данного слоя уже существует. Введите уникальное название для нового слоя.", "Название слоя", vectorLayer.Name) + ".grd"; } else { gridLayer.Name = vectorLayer.Name + ".grd"; } } map.AddLayer(gridLayer); List <GeoPoint> points = new List <GeoPoint>(); gridLayer.ColorMin = MinStripButton.BackColor; gridLayer.ColorMax = MaxStripButton.BackColor; points = GetPoints(vectorLayer); if (points.Count == 0) { MessageBox.Show("Количество точек равно 0"); } else { selectedLayer = gridLayer; gridLayer.DoInterpolation(points, searchRadius, power); ShowColors(); } } else { } map.Refresh(); } else { MessageBox.Show("Необходимо выбрать векторный слой !"); } }
public void InitiateLevel(AbstractLayer terrainLayer, int dimensionX, int dimensionY) { terrains = new DisplayTerrain[dimensionX, dimensionY]; terrains.FillWithDefault(terrainLayer); terrains.SetPosition(); LevelWidth = terrains[0, 0].ContentSize.Width * dimensionX; LevelHeight = terrains[0, 0].ContentSize.Height * dimensionY; }
public void AddLayer(AbstractLayer Layer) { Layers.Add(Layer); if (LayerControl != null) { LayerControl.RefreshList(); } Layer.map = this; }
/// <summary> /// Récupère les configurations /// </summary> /// <param name="layer">The layer.</param> private void RetrieveConfigurations(AbstractLayer layer) { foreach (ConfigurationPart part in layer.Configurations) { if (part.Visibility == Visibility.Public) { _configurations.Add(part); } } }
public void LoadLevel(AbstractLayer terrainLayer) { CurrentLevel = new Level(); CurrentLevel.InitiateLevel(terrainLayer, 3, 2); // set player positions MinPlayerPositionX = Screen.MiddleX; MinPlayerPositionY = Screen.MiddleY; MaxPlayerPositionX = CurrentLevel.LevelWidth - Screen.MiddleX; MaxPlayerPositionY = CurrentLevel.LevelHeight - Screen.MiddleY; }
public static Graphic GetRandomGraphic <T>(this AbstractLayer <T> layer) where T : IDisplayableGeoElement { Random random = new Random(); GraphicCollection graphics = layer.GetOverlay().Graphics; if (graphics.Count == 0) { return(null); } return(graphics[random.Next(0, graphics.Count)]); }
protected void Reset() { if (this.rigid == null) { this.rigid = GetComponent <T>(); } if (this.layer == null) { this.layer = GetComponent <AbstractLayer>(); } }
public override void Compile(AbstractCostFunction lossFunction, AbstractOptimizer optimizer) { AbstractLayer previousLayer = null; // compile each layer and check dimension // of input and output //layers.Reverse(); foreach (AbstractLayer layer in layers) { previousLayer = layer.Compile(previousLayer); } this.lossFunction = lossFunction; this.optimizer = optimizer; }
private List <GeoPoint> GetPoints(AbstractLayer layer) { List <GeoPoint> points = new List <GeoPoint>(); foreach (MapObject m in layer.Objects) { if (m is Labs.MapObjects.Points.Point) { var p = (Labs.MapObjects.Points.Point)m; points.Add(new GeoPoint(p.location.x, p.location.y, p.location.z)); } } return(points); }
public Layer(LayerStack layerStack, Lessons.Lesson lessonModel, AbstractLayer layerModel) { this.layerStack = layerStack; this.lessonModel = lessonModel; this.layerModel = layerModel; Strokes = StrokeConverter.ToWindowsStrokes(layerModel.Strokes); if (layerModel.GetType() == typeof(QuizAnswerLayer)) { DisplayChart(); } else if (layerModel.GetType() == typeof(GraphicalAnswerLayer)) { DisplaySaliencyMap(); } }
public static int PhysicsLayer(this GameObject obj, bool containsUnityLayer = true) { AbstractLayer layer = null; if (!(Dic.TryGetValue(obj, out layer) == true && layer != null)) { layer = obj.GetComponent <AbstractLayer>(); } if (layer == null || (containsUnityLayer == false && layer.LayerID < LayersManager.UnityLayerCount)) { return(-1); } Dic[obj] = layer; return(layer.LayerID); }
/// <summary> /// </summary> /// <param name="e">Provides data for the ElementDeleted event.</param> public override void ElementDeleted(ElementDeletedEventArgs e) { LayerPackage layerPackage = e.ModelElement as LayerPackage; if (layerPackage == null) { return; } if (layerPackage.Store.InUndoRedoOrRollback) { return; } SoftwareComponent component = CandleModel.GetInstance(layerPackage.Store).SoftwareComponent; if (component != null) { // Suppression de la couche d'interface AbstractLayer interfaceLayer = null; foreach (AbstractLayer al in component.Layers) { ISortedLayer sl = al as ISortedLayer; if (sl != null && sl.Level == layerPackage.LayerLevel) { interfaceLayer = al; break; } } if (interfaceLayer != null) { interfaceLayer.Delete(); } IList <PresentationViewsSubject> shapes = PresentationViewsSubject.GetLinksToPresentation(component); foreach (PresentationViewsSubject link in shapes) { ((SoftwareComponentShape)link.Presentation).ArrangeShapes(); } } }
/// <summary> /// Handles the Click event of the btnOK control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void btnOK_Click(object sender, EventArgs e) { if (_currentComponent == null) { return; } using ( Transaction transaction = _currentComponent.Store.TransactionManager.BeginTransaction("Set configuration status")) { bool flag = false; foreach (Item item in _items) { if (item.InitialEnabled != item.Enabled && !item.IsExternal) { AbstractLayer layer = (AbstractLayer)_currentComponent.Store.ElementDirectory.FindElement(item.LayerId); ConfigurationPart part = layer.Configurations.Find( delegate(ConfigurationPart cp) { return(cp.Name == item.ConfigName); }); if (part != null) { part.Visibility = item.Visibility; part.Enabled = item.Enabled; flag = true; // Il va falloir commiter } } } if (flag) { transaction.Commit(); } } }
/// <summary> /// Layers the doesnt exist anymore (called when a Layer is deleted) /// We keep the LayerLink instance but we can tell the user that the link is broken /// </summary> public void LayerDoesntExistAnymore() { Layer = null; _dead = true; }
public LayerLink(AbstractLayer layer) { Layer = layer; Layer.References.Add(this); _dead = false; }
public DataSet GetAllMoviesBySearchCriteria(AbstractLayer.MovieSearchCriteria criteria) { LogWrapper.LogInfo("Retrieving movies from PlanetM for given search criteria."); return DBAObj.GetAllMoviesBySearchCriteria(criteria); }
public override void ImportLayer(AbstractLayer layer) { throw new NotImplementedException(); }
public override void ImportLayer(AbstractLayer layer) { layer.UID = Guid.NewGuid().GetHashCode(); Layers.Add(layer); }
public abstract void ImportLayer(AbstractLayer layer);
public void InsertLayers(int Index, AbstractLayer Layer) { Layers.Insert(Index, Layer); }
public void Delete(AbstractLayer layer) { Layers.Remove(layer); }
public override void Add(AbstractLayer layer) { layers.Add(layer); }
/// <summary> /// Adds the layer (internal as it only should be called by the AnchoredTag) /// </summary> /// <param name="l">The layer.</param> internal void AddLayer(AbstractLayer l) { ConcernedLayers.Add(l); }
/// <summary> /// Method for adding new layer into model of convolutional neural network /// </summary> /// <param name="layer">e.g. ConvolutionalLayer</param> public abstract void Add(AbstractLayer layer);
/// <summary> /// Removes the layer. (internal as it only should be called by the AnchoredTag) /// </summary> /// <param name="l">The layer.</param> internal void RemoveLayer(AbstractLayer l) { ConcernedLayers.Remove(l); }