Algebraically Doubly Stochastic Matrices Over Principal Ideal Domains