If you're referring to coin.cls
that forms part of the Computational Intelligence group at Dalhousie University's Department of Computer Science, then the solution is fairly straight-forward if you want to keep using algorithm2e
: set the \procedure
and \endprocedure
macros to \relax
.

% https://projects.cs.dal.ca/ci/latex/template-files/coin.cls
\documentclass{coin}
\let\procedure\relax
\let\endprocedure\relax
\usepackage[algo2e]{algorithm2e}
\begin{document}
\begin{algorithm2e}[H]
\SetAlgoLined
\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\caption{How to write algorithms}
\end{algorithm2e}
\end{document}
So if you're not going use these theorem-like structures, then there shouldn't be any other conflict.
Both the algorithm
and procedure
environments are predefined inside the coin
document class as theorems:
\newtheorem{algorithm}{Algorithm}%[theorem]
%...
\newtheorem{procedure}{Procedure}%[section]
The algorithm
environment definition is avoided by using the algo2e
option of algorithm2e
, which creates an algorithm2e
float rather than algorithm
.
coin.cls
?