| /** |
| * Copyright (c) 2020 CEA LIST |
| * |
| * All rights reserved. This program and the accompanying materials are |
| * made available under the terms of the Eclipse Public License v2.0 which |
| * accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| */ |
| package org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.impl; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| |
| import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class Pooling_layersFactoryImpl extends EFactoryImpl implements Pooling_layersFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static Pooling_layersFactory init() { |
| try { |
| Pooling_layersFactory thePooling_layersFactory = (Pooling_layersFactory)EPackage.Registry.INSTANCE.getEFactory(Pooling_layersPackage.eNS_URI); |
| if (thePooling_layersFactory != null) { |
| return thePooling_layersFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new Pooling_layersFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Pooling_layersFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case Pooling_layersPackage.ADAPTATIVE_MAX_POOL1D: return createAdaptativeMaxPool1d(); |
| case Pooling_layersPackage.ADAPTATIVE_MAX_POOL2D: return createAdaptativeMaxPool2d(); |
| case Pooling_layersPackage.ADAPTATIVE_MAX_POOL3D: return createAdaptativeMaxPool3d(); |
| case Pooling_layersPackage.ADAPTIVE_AVG_POOL3D: return createAdaptiveAvgPool3d(); |
| case Pooling_layersPackage.ADAPTIVE_AVG_POOL2D: return createAdaptiveAvgPool2d(); |
| case Pooling_layersPackage.ADAPTIVE_AVG_POOL1D: return createAdaptiveAvgPool1d(); |
| case Pooling_layersPackage.MAX_POOL1D: return createMaxPool1d(); |
| case Pooling_layersPackage.MAX_UNPOOL1D: return createMaxUnpool1d(); |
| case Pooling_layersPackage.AVG_POOL1D: return createAvgPool1d(); |
| case Pooling_layersPackage.MAX_UNPOOL2D: return createMaxUnpool2d(); |
| case Pooling_layersPackage.MAX_UNPOOL3D: return createMaxUnpool3d(); |
| case Pooling_layersPackage.LP_POOL1D: return createLPPool1d(); |
| case Pooling_layersPackage.LP_POOL2D: return createLPPool2d(); |
| case Pooling_layersPackage.AVG_POOL2D: return createAvgPool2d(); |
| case Pooling_layersPackage.AVG_POOL3D: return createAvgPool3d(); |
| case Pooling_layersPackage.MAX_POOL2D: return createMaxPool2d(); |
| case Pooling_layersPackage.MAX_POOL3D: return createMaxPool3d(); |
| case Pooling_layersPackage.FRACTIONAL_MAX_POOL2D: return createFractionalMaxPool2d(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AdaptativeMaxPool1d createAdaptativeMaxPool1d() { |
| AdaptativeMaxPool1dImpl adaptativeMaxPool1d = new AdaptativeMaxPool1dImpl(); |
| return adaptativeMaxPool1d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AdaptativeMaxPool2d createAdaptativeMaxPool2d() { |
| AdaptativeMaxPool2dImpl adaptativeMaxPool2d = new AdaptativeMaxPool2dImpl(); |
| return adaptativeMaxPool2d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AdaptativeMaxPool3d createAdaptativeMaxPool3d() { |
| AdaptativeMaxPool3dImpl adaptativeMaxPool3d = new AdaptativeMaxPool3dImpl(); |
| return adaptativeMaxPool3d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AdaptiveAvgPool3d createAdaptiveAvgPool3d() { |
| AdaptiveAvgPool3dImpl adaptiveAvgPool3d = new AdaptiveAvgPool3dImpl(); |
| return adaptiveAvgPool3d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AdaptiveAvgPool2d createAdaptiveAvgPool2d() { |
| AdaptiveAvgPool2dImpl adaptiveAvgPool2d = new AdaptiveAvgPool2dImpl(); |
| return adaptiveAvgPool2d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AdaptiveAvgPool1d createAdaptiveAvgPool1d() { |
| AdaptiveAvgPool1dImpl adaptiveAvgPool1d = new AdaptiveAvgPool1dImpl(); |
| return adaptiveAvgPool1d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public MaxPool1d createMaxPool1d() { |
| MaxPool1dImpl maxPool1d = new MaxPool1dImpl(); |
| return maxPool1d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public MaxUnpool1d createMaxUnpool1d() { |
| MaxUnpool1dImpl maxUnpool1d = new MaxUnpool1dImpl(); |
| return maxUnpool1d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AvgPool1d createAvgPool1d() { |
| AvgPool1dImpl avgPool1d = new AvgPool1dImpl(); |
| return avgPool1d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public MaxUnpool2d createMaxUnpool2d() { |
| MaxUnpool2dImpl maxUnpool2d = new MaxUnpool2dImpl(); |
| return maxUnpool2d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public MaxUnpool3d createMaxUnpool3d() { |
| MaxUnpool3dImpl maxUnpool3d = new MaxUnpool3dImpl(); |
| return maxUnpool3d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public LPPool1d createLPPool1d() { |
| LPPool1dImpl lpPool1d = new LPPool1dImpl(); |
| return lpPool1d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public LPPool2d createLPPool2d() { |
| LPPool2dImpl lpPool2d = new LPPool2dImpl(); |
| return lpPool2d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AvgPool2d createAvgPool2d() { |
| AvgPool2dImpl avgPool2d = new AvgPool2dImpl(); |
| return avgPool2d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AvgPool3d createAvgPool3d() { |
| AvgPool3dImpl avgPool3d = new AvgPool3dImpl(); |
| return avgPool3d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public MaxPool2d createMaxPool2d() { |
| MaxPool2dImpl maxPool2d = new MaxPool2dImpl(); |
| return maxPool2d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public MaxPool3d createMaxPool3d() { |
| MaxPool3dImpl maxPool3d = new MaxPool3dImpl(); |
| return maxPool3d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public FractionalMaxPool2d createFractionalMaxPool2d() { |
| FractionalMaxPool2dImpl fractionalMaxPool2d = new FractionalMaxPool2dImpl(); |
| return fractionalMaxPool2d; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Pooling_layersPackage getPooling_layersPackage() { |
| return (Pooling_layersPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static Pooling_layersPackage getPackage() { |
| return Pooling_layersPackage.eINSTANCE; |
| } |
| |
| } //Pooling_layersFactoryImpl |