Lines Matching refs:cpy
112 TripletSparseMatrix cpy(orig);
114 EXPECT_EQ(cpy.num_rows(), 2);
115 EXPECT_EQ(cpy.num_cols(), 5);
116 ASSERT_EQ(cpy.num_nonzeros(), 2);
117 EXPECT_EQ(cpy.max_num_nonzeros(), 4);
119 EXPECT_EQ(cpy.rows()[0], 0);
120 EXPECT_EQ(cpy.rows()[1], 1);
122 EXPECT_EQ(cpy.cols()[0], 1);
123 EXPECT_EQ(cpy.cols()[1], 4);
125 EXPECT_DOUBLE_EQ(cpy.values()[0], 2.5);
126 EXPECT_DOUBLE_EQ(cpy.values()[1], 5.2);
140 TripletSparseMatrix cpy(3, 50, 40);
141 cpy.mutable_rows()[0] = 0;
142 cpy.mutable_cols()[0] = 10;
143 cpy.mutable_values()[0] = 10.22;
145 cpy.mutable_rows()[1] = 2;
146 cpy.mutable_cols()[1] = 23;
147 cpy.mutable_values()[1] = 34.45;
149 cpy.mutable_rows()[0] = 0;
150 cpy.mutable_cols()[0] = 10;
151 cpy.mutable_values()[0] = 10.22;
153 cpy.mutable_rows()[1] = 0;
154 cpy.mutable_cols()[1] = 3;
155 cpy.mutable_values()[1] = 4.4;
156 cpy.set_num_nonzeros(3);
158 cpy = orig;
160 EXPECT_EQ(cpy.num_rows(), 2);
161 EXPECT_EQ(cpy.num_cols(), 5);
162 ASSERT_EQ(cpy.num_nonzeros(), 2);
163 EXPECT_EQ(cpy.max_num_nonzeros(), 4);
165 EXPECT_EQ(cpy.rows()[0], 0);
166 EXPECT_EQ(cpy.rows()[1], 1);
168 EXPECT_EQ(cpy.cols()[0], 1);
169 EXPECT_EQ(cpy.cols()[1], 4);
171 EXPECT_DOUBLE_EQ(cpy.values()[0], 2.5);
172 EXPECT_DOUBLE_EQ(cpy.values()[1], 5.2);