blob: 8ec0dd42bcb405dc41bbd8986fd5d3c53fe803b9 [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.NonLinearActivations.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.NonLinearActivations.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class NonLinearActivationsFactoryImpl extends EFactoryImpl implements NonLinearActivationsFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static NonLinearActivationsFactory init() {
try {
NonLinearActivationsFactory theNonLinearActivationsFactory = (NonLinearActivationsFactory)EPackage.Registry.INSTANCE.getEFactory(NonLinearActivationsPackage.eNS_URI);
if (theNonLinearActivationsFactory != null) {
return theNonLinearActivationsFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new NonLinearActivationsFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NonLinearActivationsFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case NonLinearActivationsPackage.ELU: return createELU();
case NonLinearActivationsPackage.LEAKY_RE_LU: return createLeakyReLU();
case NonLinearActivationsPackage.LOG_SIGMOID: return createLogSigmoid();
case NonLinearActivationsPackage.MULTIHEAD_ATTENTION: return createMultiheadAttention();
case NonLinearActivationsPackage.PRE_LU: return createPReLU();
case NonLinearActivationsPackage.RE_LU: return createReLU();
case NonLinearActivationsPackage.RE_LU6: return createReLU6();
case NonLinearActivationsPackage.SELU: return createSELU();
case NonLinearActivationsPackage.RRE_LU: return createRReLU();
case NonLinearActivationsPackage.CELU: return createCELU();
case NonLinearActivationsPackage.GELU: return createGELU();
case NonLinearActivationsPackage.SIGMOID: return createSigmoid();
case NonLinearActivationsPackage.SOFTPLUS: return createSoftplus();
case NonLinearActivationsPackage.SOFTSHRINK: return createSoftshrink();
case NonLinearActivationsPackage.HARDSHRINK: return createHardshrink();
case NonLinearActivationsPackage.SOFTSIGN: return createSoftsign();
case NonLinearActivationsPackage.TANHSHRINK: return createTanhshrink();
case NonLinearActivationsPackage.TANH: return createTanh();
case NonLinearActivationsPackage.THRESHOLD: return createThreshold();
case NonLinearActivationsPackage.HARDTANH: return createHardtanh();
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 ELU createELU() {
ELUImpl elu = new ELUImpl();
return elu;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public LeakyReLU createLeakyReLU() {
LeakyReLUImpl leakyReLU = new LeakyReLUImpl();
return leakyReLU;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public LogSigmoid createLogSigmoid() {
LogSigmoidImpl logSigmoid = new LogSigmoidImpl();
return logSigmoid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public MultiheadAttention createMultiheadAttention() {
MultiheadAttentionImpl multiheadAttention = new MultiheadAttentionImpl();
return multiheadAttention;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public PReLU createPReLU() {
PReLUImpl pReLU = new PReLUImpl();
return pReLU;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ReLU createReLU() {
ReLUImpl reLU = new ReLUImpl();
return reLU;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ReLU6 createReLU6() {
ReLU6Impl reLU6 = new ReLU6Impl();
return reLU6;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public SELU createSELU() {
SELUImpl selu = new SELUImpl();
return selu;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public RReLU createRReLU() {
RReLUImpl rReLU = new RReLUImpl();
return rReLU;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public CELU createCELU() {
CELUImpl celu = new CELUImpl();
return celu;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public GELU createGELU() {
GELUImpl gelu = new GELUImpl();
return gelu;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Sigmoid createSigmoid() {
SigmoidImpl sigmoid = new SigmoidImpl();
return sigmoid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Softplus createSoftplus() {
SoftplusImpl softplus = new SoftplusImpl();
return softplus;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Softshrink createSoftshrink() {
SoftshrinkImpl softshrink = new SoftshrinkImpl();
return softshrink;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Hardshrink createHardshrink() {
HardshrinkImpl hardshrink = new HardshrinkImpl();
return hardshrink;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Softsign createSoftsign() {
SoftsignImpl softsign = new SoftsignImpl();
return softsign;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Tanhshrink createTanhshrink() {
TanhshrinkImpl tanhshrink = new TanhshrinkImpl();
return tanhshrink;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Tanh createTanh() {
TanhImpl tanh = new TanhImpl();
return tanh;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Threshold createThreshold() {
ThresholdImpl threshold = new ThresholdImpl();
return threshold;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Hardtanh createHardtanh() {
HardtanhImpl hardtanh = new HardtanhImpl();
return hardtanh;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NonLinearActivationsPackage getNonLinearActivationsPackage() {
return (NonLinearActivationsPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static NonLinearActivationsPackage getPackage() {
return NonLinearActivationsPackage.eINSTANCE;
}
} //NonLinearActivationsFactoryImpl