| /** |
| * 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.Layer_weight_initializers.util; |
| |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| import org.eclipse.emf.ecore.util.Switch; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_initializers.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * The <b>Switch</b> for the model's inheritance hierarchy. |
| * It supports the call {@link #doSwitch(EObject) doSwitch(object)} |
| * to invoke the <code>caseXXX</code> method for each class of the model, |
| * starting with the actual class of the object |
| * and proceeding up the inheritance hierarchy |
| * until a non-null result is returned, |
| * which is the result of the switch. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_initializers.Layer_weight_initializersPackage |
| * @generated |
| */ |
| public class Layer_weight_initializersSwitch<T> extends Switch<T> { |
| /** |
| * The cached model package |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected static Layer_weight_initializersPackage modelPackage; |
| |
| /** |
| * Creates an instance of the switch. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Layer_weight_initializersSwitch() { |
| if (modelPackage == null) { |
| modelPackage = Layer_weight_initializersPackage.eINSTANCE; |
| } |
| } |
| |
| /** |
| * Checks whether this is a switch for the given package. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param ePackage the package in question. |
| * @return whether this is a switch for the given package. |
| * @generated |
| */ |
| @Override |
| protected boolean isSwitchFor(EPackage ePackage) { |
| return ePackage == modelPackage; |
| } |
| |
| /** |
| * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @return the first non-null result returned by a <code>caseXXX</code> call. |
| * @generated |
| */ |
| @Override |
| protected T doSwitch(int classifierID, EObject theEObject) { |
| switch (classifierID) { |
| case Layer_weight_initializersPackage.RANDOM_NORMAL: { |
| random_normal random_normal = (random_normal)theEObject; |
| T result = caserandom_normal(random_normal); |
| if (result == null) result = caseinitializer_with_mean_stddev(random_normal); |
| if (result == null) result = caseinitializer_with_seed(random_normal); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.INITIALIZER_WITH_MEAN_STDDEV: { |
| initializer_with_mean_stddev initializer_with_mean_stddev = (initializer_with_mean_stddev)theEObject; |
| T result = caseinitializer_with_mean_stddev(initializer_with_mean_stddev); |
| if (result == null) result = caseinitializer_with_seed(initializer_with_mean_stddev); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.INITIALIZER_WITH_SEED: { |
| initializer_with_seed initializer_with_seed = (initializer_with_seed)theEObject; |
| T result = caseinitializer_with_seed(initializer_with_seed); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.RANDOM_UNIFORM: { |
| random_uniform random_uniform = (random_uniform)theEObject; |
| T result = caserandom_uniform(random_uniform); |
| if (result == null) result = caseinitializer_with_seed(random_uniform); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.TRUNCATED_NORMAL: { |
| truncated_normal truncated_normal = (truncated_normal)theEObject; |
| T result = casetruncated_normal(truncated_normal); |
| if (result == null) result = caseinitializer_with_mean_stddev(truncated_normal); |
| if (result == null) result = caseinitializer_with_seed(truncated_normal); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.ZEROS: { |
| zeros zeros = (zeros)theEObject; |
| T result = casezeros(zeros); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.ONES: { |
| ones ones = (ones)theEObject; |
| T result = caseones(ones); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.GLOROT_NORMAL: { |
| glorot_normal glorot_normal = (glorot_normal)theEObject; |
| T result = caseglorot_normal(glorot_normal); |
| if (result == null) result = caseinitializer_with_seed(glorot_normal); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.GLOROT_UNIFORM: { |
| glorot_uniform glorot_uniform = (glorot_uniform)theEObject; |
| T result = caseglorot_uniform(glorot_uniform); |
| if (result == null) result = caseinitializer_with_seed(glorot_uniform); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.IDENTITY: { |
| identity identity = (identity)theEObject; |
| T result = caseidentity(identity); |
| if (result == null) result = caseinitializer_with_gain(identity); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.INITIALIZER_WITH_GAIN: { |
| initializer_with_gain initializer_with_gain = (initializer_with_gain)theEObject; |
| T result = caseinitializer_with_gain(initializer_with_gain); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.ORTHOGONAL: { |
| orthogonal orthogonal = (orthogonal)theEObject; |
| T result = caseorthogonal(orthogonal); |
| if (result == null) result = caseinitializer_with_gain(orthogonal); |
| if (result == null) result = caseinitializer_with_seed(orthogonal); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.CONSTANT: { |
| constant constant = (constant)theEObject; |
| T result = caseconstant(constant); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case Layer_weight_initializersPackage.VARIANCE_SCALING: { |
| variance_scaling variance_scaling = (variance_scaling)theEObject; |
| T result = casevariance_scaling(variance_scaling); |
| if (result == null) result = caseinitializer_with_seed(variance_scaling); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| default: return defaultCase(theEObject); |
| } |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>random normal</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>random normal</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caserandom_normal(random_normal object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>initializer with mean stddev</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>initializer with mean stddev</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseinitializer_with_mean_stddev(initializer_with_mean_stddev object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>initializer with seed</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>initializer with seed</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseinitializer_with_seed(initializer_with_seed object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>random uniform</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>random uniform</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caserandom_uniform(random_uniform object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>truncated normal</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>truncated normal</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T casetruncated_normal(truncated_normal object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>zeros</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>zeros</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T casezeros(zeros object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>ones</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>ones</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseones(ones object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>glorot normal</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>glorot normal</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseglorot_normal(glorot_normal object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>glorot uniform</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>glorot uniform</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseglorot_uniform(glorot_uniform object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>identity</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>identity</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseidentity(identity object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>initializer with gain</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>initializer with gain</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseinitializer_with_gain(initializer_with_gain object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>orthogonal</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>orthogonal</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseorthogonal(orthogonal object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>constant</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>constant</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseconstant(constant object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>variance scaling</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>variance scaling</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T casevariance_scaling(variance_scaling object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. |
| * <!-- begin-user-doc --> |
| * This implementation returns null; |
| * returning a non-null result will terminate the switch, but this is the last case anyway. |
| * <!-- end-user-doc --> |
| * @param object the target of the switch. |
| * @return the result of interpreting the object as an instance of '<em>EObject</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) |
| * @generated |
| */ |
| @Override |
| public T defaultCase(EObject object) { |
| return null; |
| } |
| |
| } //Layer_weight_initializersSwitch |