001    // GraphLab Project: http://graphlab.sharif.edu
002    // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology
003    // Distributed under the terms of the GNU Lesser General Public License (LGPL): http://www.gnu.org/licenses/
004    
005    package graphlab.library;
006    
007    /**
008     * Wrapper for basic properties of a vertex.
009     * @author Omid Aladini
010     */
011    
012    /**
013     * @author Omid
014     */
015    public class BaseVertexProperties
016            implements Cloneable {
017        public int color;
018        public boolean mark;
019        /**
020         * You can store anything you want.
021         */
022        public Object obj;
023    
024        public BaseVertexProperties(BaseVertexProperties p) {
025            color = p.color;
026            mark = p.mark;
027        }
028    
029        public BaseVertexProperties(int color, boolean mark) {
030            this.color = color;
031            this.mark = mark;
032        }
033    
034        /* (non-Javadoc)
035          * @see java.lang.Object#equals(java.lang.Object)
036          */
037        @Override
038        public boolean equals(Object obj) {
039            if (!(obj instanceof BaseVertexProperties))
040                return false;
041    
042            BaseVertexProperties b = (BaseVertexProperties) obj;
043    
044            return b.color == color;
045    
046        }
047    }