Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Baunsgaard committed Oct 22, 2024
1 parent 74947e2 commit d250e34
Showing 1 changed file with 39 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.apache.sysds.common.Types.ValueType;
Expand Down Expand Up @@ -476,56 +475,56 @@ public boolean possiblyContainsNaN() {
// @Override
// @SuppressWarnings("unchecked")
// protected Map<T, Long> createRecodeMap(int estimate) {
// if(getValueType() == ValueType.BOOLEAN) {
// // shortcut for boolean arrays, since we only
// // need to encounter the first two false and true values.
// Map<T, Long> map = new HashMap<>(estimate);
// long id = 1;
// for(int i = 0; i < size() && id <= 2; i++)
// id = addValRecodeMap(map, id, i);

// return map;
// }
// else if(getValueType() == ValueType.HASH32){
// Map<Object, Long> map = new HashMap<>(estimate);
// HashIntegerArray b = (HashIntegerArray)_a;
// long id = 1;
// for(int i = 0; i < size(); i++){
// if(_n.get(i))
// id = b.addValRecodeMap(map, id, i);
// }
// return (Map<T, Long>)map;
// }
// else if(getValueType() == ValueType.HASH64){
// Map<Object, Long> map = new HashMap<>(estimate);
// HashLongArray b = (HashLongArray)_a;
// long id = 1;
// for(int i = 0; i < size(); i++){
// if(_n.get(i))
// id = b.addValRecodeMap(map, id, i);
// }
// return (Map<T, Long>)map;
// }
// else
// return super.createRecodeMap(estimate);
// if(getValueType() == ValueType.BOOLEAN) {
// // shortcut for boolean arrays, since we only
// // need to encounter the first two false and true values.
// Map<T, Long> map = new HashMap<>(estimate);
// long id = 1;
// for(int i = 0; i < size() && id <= 2; i++)
// id = addValRecodeMap(map, id, i);

// return map;
// }
// else if(getValueType() == ValueType.HASH32){
// Map<Object, Long> map = new HashMap<>(estimate);
// HashIntegerArray b = (HashIntegerArray)_a;
// long id = 1;
// for(int i = 0; i < size(); i++){
// if(_n.get(i))
// id = b.addValRecodeMap(map, id, i);
// }
// return (Map<T, Long>)map;
// }
// else if(getValueType() == ValueType.HASH64){
// Map<Object, Long> map = new HashMap<>(estimate);
// HashLongArray b = (HashLongArray)_a;
// long id = 1;
// for(int i = 0; i < size(); i++){
// if(_n.get(i))
// id = b.addValRecodeMap(map, id, i);
// }
// return (Map<T, Long>)map;
// }
// else
// return super.createRecodeMap(estimate);
// }

@Override
public void setM(Map<T, Long> map, AMapToData m, int i){
_a.setM(map,m,i);
@Override
public void setM(Map<T, Long> map, AMapToData m, int i) {
_a.setM(map, m, i);
}

@Override
@Override
public void setM(Map<T, Long> map, int si, AMapToData m, int i) {
if(_n.get(i))
_a.setM(map,si,m,i);
_a.setM(map, si, m, i);
else
m.set(i, si);
}

@Override
@Override
protected long addValRecodeMap(Map<T, Long> map, long id, int i) {

if(_n.get(i)) {
id = _a.addValRecodeMap(map, id, i);
}
Expand Down

0 comments on commit d250e34

Please sign in to comment.