blob: e15a90bfa0471003e2a5ee4d58c50093602750ae [file] [log] [blame]
/**
* 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.SoftMinMaxActivations.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.SoftMinMaxActivations.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class SoftMinMaxActivationsFactoryImpl extends EFactoryImpl implements SoftMinMaxActivationsFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static SoftMinMaxActivationsFactory init() {
try {
SoftMinMaxActivationsFactory theSoftMinMaxActivationsFactory = (SoftMinMaxActivationsFactory)EPackage.Registry.INSTANCE.getEFactory(SoftMinMaxActivationsPackage.eNS_URI);
if (theSoftMinMaxActivationsFactory != null) {
return theSoftMinMaxActivationsFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new SoftMinMaxActivationsFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SoftMinMaxActivationsFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case SoftMinMaxActivationsPackage.SOFTMIN: return createSoftmin();
case SoftMinMaxActivationsPackage.SOFTMAX: return createSoftmax();
case SoftMinMaxActivationsPackage.SOFTMAX2D: return createSoftmax2d();
case SoftMinMaxActivationsPackage.LOG_SOFTMAX: return createLogSoftmax();
case SoftMinMaxActivationsPackage.ADAPTIVE_LOG_SOFTMAX_WITH_LOSS: return createAdaptiveLogSoftmaxWithLoss();
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 Softmin createSoftmin() {
SoftminImpl softmin = new SoftminImpl();
return softmin;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Softmax createSoftmax() {
SoftmaxImpl softmax = new SoftmaxImpl();
return softmax;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Softmax2d createSoftmax2d() {
Softmax2dImpl softmax2d = new Softmax2dImpl();
return softmax2d;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public LogSoftmax createLogSoftmax() {
LogSoftmaxImpl logSoftmax = new LogSoftmaxImpl();
return logSoftmax;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public AdaptiveLogSoftmaxWithLoss createAdaptiveLogSoftmaxWithLoss() {
AdaptiveLogSoftmaxWithLossImpl adaptiveLogSoftmaxWithLoss = new AdaptiveLogSoftmaxWithLossImpl();
return adaptiveLogSoftmaxWithLoss;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public SoftMinMaxActivationsPackage getSoftMinMaxActivationsPackage() {
return (SoftMinMaxActivationsPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static SoftMinMaxActivationsPackage getPackage() {
return SoftMinMaxActivationsPackage.eINSTANCE;
}
} //SoftMinMaxActivationsFactoryImpl