Structural Balance: A Generalization of Heider's Theory