When it appears that the partition cannot be made equal between the parties according to their respective rights, without prejudice to the rights and interests of some of them, and a partition be ordered, the court may adjudge compensation to be made by one party to another, on account of the inequality; but such compensation shall not be required to be made to others by owners unknown, nor by an infant, unless it appears that such infant has personal property sufficient for that purpose, and that his interest will be promoted thereby. In all cases the court has power to make compensatory adjustment between the respective parties, according to the ordinary principles of equity.
SDCL 21-45-19