% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/runELA.R
\name{Bi}
\alias{Bi}
\title{Bi}
\usage{
Bi(xi, h, j)
}
\arguments{
\item{xi}{Binary vector representing the initial state.}

\item{h}{vector of implicit/explicit environmental effects on species.}

\item{j}{Matrix of species interactions.}
}
\value{
A list with two elements:
  (1) integer stable state ID (basin assignment),
  (2) energy of the corresponding stable state.
}
\description{
Identify basin (stable state) and its energy for a given state.

Applies \link{SteepestDescent} to the input state and returns the basin (stable state) reached,
together with its energy. The stable state is encoded as an integer ID using \link{bin2id}.
}
