1#ifndef RESTRICTION_OP_H
2#define RESTRICTION_OP_H
5#include "CombBLAS/CombBLAS.h"
24template <
typename T1,
typename T2>
63template <
typename T1,
typename T2>
89template <
typename T1,
typename T2>
98 std::cout <<
"This should have never been executed for MIS-2 to be correct" << std::endl;
117template <
typename ONT,
typename IT,
typename INT,
typename DER>
139 while (
cand.getnnz() > 0)
150 [](
double x,
double y){
return std::min(
x,
y);},
151 [](
double x,
double y){
return true;},
152 true,
true, 2.0, 2.0,
true);
159 [](
double x,
double y){
return (
ONT)1;},
160 [](
double x,
double y){
return y<=
x;},
161 true,
false, 2.0, 2.0,
true);
165 [](
double x,
ONT y){
return x;},
166 [](
double x,
ONT y){
return true;},
167 false,
true, 0.0, (
ONT) 0,
false);
176 true,
true, (
ONT) 1, (
ONT) 1,
true);
181 [](
double x,
ONT y){
return x;},
182 [](
double x,
ONT y){
return true;},
183 false,
true, 0.0, (
ONT) 0,
false);
189 true,
true, (
ONT) 1, (
ONT) 1,
true);
196template <
typename IT,
typename NT>
199 if(
CMG.layer_grid == 0)
215 mis2.PrintInfo(
"mis2");
221 [](
IT x,
IT y){
return true;},
222 true,
true, (
IT) -1, (
IT) -1,
true);
246 [](
IT x,
IT y){
return true;},
247 true,
true, (
IT) -1, (
IT) -1,
true);
252 SpParHelper::Print(
" !!!! Error: mis2neighUnion does not include all rows/columns. !!!! ");
278 std::ostringstream
outs;
static void Print(const std::string &s)
void RestrictionOp(CCGrid &CMG, SpDCCols< IT, NT > *localmat, SpDCCols< IT, NT > *&R, SpDCCols< IT, NT > *&RT)
FullyDistSpVec< IT, ONT > MIS2(SpParMat< IT, INT, DER > A)
static bool returnedSAID()
static T2 add(const T2 &arg1, const T2 &arg2)
static T2 multiply(const T1 &arg1, const T2 &arg2)
static void axpy(const T1 a, const T2 &x, T2 &y)
static bool returnedSAID()
static void axpy(const T1 a, const T2 &x, T2 &y)
static T2 add(const T2 &arg1, const T2 &arg2)
static T2 multiply(const T1 &arg1, const T2 &arg2)
static VertexType< T2 > multiply(const T1 &arg1, const VertexType< T2 > &arg2)
static VertexType< T2 > id()
static VertexType< T2 > add(const VertexType< T2 > &arg1, const VertexType< T2 > &arg2)
static bool returnedSAID()
static void axpy(T1 a, const VertexType< T2 > &x, VertexType< T2 > &y)
friend bool operator<(const VertexType &vtx1, const VertexType &vtx2)
friend bool operator==(const VertexType &vtx1, const VertexType &vtx2)
friend std::ostream & operator<<(std::ostream &os, const VertexType &vertex)
VertexType(T pa, double pr)