/*
 * Copyright (c) 2026 University of Insubria <https://www.uninsubria.it>
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version. All we ask is that proper credit is given
 * for our work, which includes - but is not limited to - adding the above
 * copyright notice to the beginning of your source code files, and to any
 * copyright notice that you may distribute with programs based on this work.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation, Inc.
 * <https://fsf.org/>
 */

package qsardes.descriptor.qsarme;

import qsardes.descriptor.DescriptorWalkCount;

/**
 * Walk count descriptors (QSAR-ME Profiler 2025).
 * <BR><BR>
 * Calculates walk count descriptors.
 * <BR><BR>
 * MWC# - Order # walk count log(1 + x) scale.
 * <BR>
 * SRW# - Order # self-returning walk count log(1 + x) scale.
 * <BR><BR>
 * # is the order spanning from 2 to 10.
 * <BR><BR>
 * TWC - Total walk count (orders from 2 to 10).
 * <BR>
 * TSRW - Total self-return walk count (up to order 10) log(1 + x) scale.
 *
 * @author Nicola Chirico
 */
public final class QsarMEWalkCount extends DescriptorWalkCount
{
    public QsarMEWalkCount()
    {
    }

    @Override
    protected double calculate_tsrw(int diag_value)
    {
        return diag_value;
    }

    @Override
    protected double get_tsrw(double tsrw)
    {
        return StrictMath.log(1.0 + tsrw);
    }
}
