2 * Copyright © 2020 AT&T, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.common.fixedflex;
11 public class FlexGridImpl implements FlexGridInterface {
14 static final double PRECISION = 100000d;
16 public FlexGridImpl(double start, double stop) {
21 public FlexGridImpl() {
27 public FlexGridImpl getFlexWaveMapping(float centerFrequency, float slotwidth) {
28 FlexGridImpl flexGridImpl = new FlexGridImpl();
29 flexGridImpl.start = centerFrequency - (slotwidth / 2) / 1000.0;
30 flexGridImpl.start = Math.round(flexGridImpl.start * PRECISION) / PRECISION;
31 flexGridImpl.stop = centerFrequency + (slotwidth / 2) / 1000.0;
32 flexGridImpl.stop = Math.round(flexGridImpl.stop * PRECISION) / PRECISION;
36 public double getStart() {
40 public double getStop() {